MYSQL错误

0 php mysql

忍受我,我对这一切都有点新鲜,

我在我的PHP脚本中运行此查询:

$insertQuery = "INSERT INTO blog_articles 
     VALUES '$title', $tags', '$category', '$blog', '$author', '$date'";
Run Code Online (Sandbox Code Playgroud)

然后我运行这个脚本:

    if ($result = $connector->query($insertQuery)){
    // It worked, give confirmation
    echo '<center><b>Article added to the database</b></center><br>';
}else{
    // It hasn't worked so stop. Better error handling code would be good here!
    die (mysql_error());
}
}
Run Code Online (Sandbox Code Playgroud)

我收到此错误:

您的SQL语法有错误; 查看与您的MySQL服务器版本对应的手册,以便在第2行附近使用"Title Number 1,General,Blogging,Kayaking,General,Tgis是博客编号spelli"时使用正确的语法

但我不知道错误是什么,它看起来很好,所以如果有人可以帮助我,那将是非常感谢

Ali*_*ock 6

$ tag之前缺少一个引号.