使用简单的插入命令挣扎,我收到错误
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());
谢谢你们
答案 0 :(得分:7)
看起来你错过了'在$ Film_Name之前'。你能添加缺少的撇号吗?
答案 1 :(得分:1)
如果您在服务器上启用了phpmyadmin,则可以将代码粘贴到SQL-Field中,以便在SQL查询中突出显示语法。