我已经尝试了很多来解决这个小问题......我正在尝试更新 PHPmyadmin 数据库中的记录。
$query = 'UPDATE movie SET
movie_name = "'.$_POST['movie_name'].'";
movie_year = '.$_POST['movie_year'].';
movie_type = "'.$_POST['movie_type'].'";
movie_leadactor = "'.$_POST['movie_leadactor'].'";
movie_director = "'.$_POST['movie_director'].'";
movie_running_time = "'.$_POST['movie_time'].'";
movie_cost = "'.$_POST['movie_cost'].'";
movie_takings = "'.$_POST['movie_earn'].'"';
但是当我将此查询放入 sql 时,它会显示错误。
这是我的简单查询.....
UPDATE movie SET movie_name = "XXX"; movie_year = 2010; movie_type = "7"; movie_leadactor = "4"; movie_director = "6"; movie_running_time = "90 "; movie_cost = "6.0 "; movie_takings = "22.0 "
我该如何解决?请帮忙
错误出现在movie_year 上。错误代码是 1064