2014-09-04 37 views
0

有人可以检查这一行中的问题。 我知道如果问题看起来天真,我会自己关闭它,如果它没有足够的贡献。mysql错误:检查MySQL服务器版本

Error : 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 '20','none',now())' at line 2 

代码:

$query_cs_pm = mysql_query("INSERT INTO coating_station_pm (challan_no_cs_pm,emp_inch_cs_pm,shift_time,client_name,diameter_cs_pm,no_of_bars_cs_pm,tempreture_cs_pm,remarks_cs_pm,datetime) 
               VALUES ('".$challan_no."','".$emp_inch_id."','".$shift_time_cs_pm."','".$client_name_cs_pm."','".$bar_dia_cs_pm[$i]."','".$no_of_bars_cs_pm[$i].",'".$tempreture_cs_pm[$i]."','".$remarks_cs_pm[$i]."',now())" 
           ); 

回答

2

这里'".$no_of_bars_cs_pm[$i].",'在参数的结尾处失踪。

您应该使用预先准备好的声明,以便这不会成为问题。

相关问题