1

挣扎于一个简单的插入命令,我得到了错误

You have an error in your SQL syntax; check the manual that corresponds to 
your MySQL server version for the right syntax to use near 'All In: 
The Poker Movie, tells the story of poker focusing on why one of our nat' 
at line 2"

基本上将电影信息传递到表格中,这里是代码 -

$query1 = "INSERT INTO Films_Info (Films_ID,FilmName, FilmRelease, Synopsis,Poster,CritScore,AudScore,Director,Studio,IMDB,date_added_db) 
VALUES ('',$Film_Name', '$Film_Release','$filmsynopsis','$film_image','$film_critic','$film_audience','$film_director','$film_studio','$film_imdbID','')";
$runquery1 = mysql_query($query1)or die(mysql_error()); 

多谢你们

4

2 回答 2

7

看起来您在 $Film_Name 之前缺少一个 '。你能添加缺少的撇号吗?

于 2012-04-17T23:26:22.013 回答
1

如果您在服务器上启用了 phpmyadmin,则可以将代码粘贴到 SQL-Field 中以在 SQL 查询上突出显示语法。

于 2012-04-17T23:31:01.497 回答