漲跌幅`,`成交量`,`成交額`,`委比`,`日期`) values('','','','','','','','','','','','','','$j')");
if($query!=true){echo "exit".mysql_errno().mysql_error();}
echo "sucess";}
?>
運行後出現如下提示運行1064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',`成交量`,`成交額`,`委比`,`日期`) values('','','','','','','',''' at line 1:
------解決方案--------------------
把裡面的全形逗號改為半形的再說。
------解決方案--------------------
改成這樣應該可以了。
$query=mysql_query("insert into abc (`股票代號`,`股票名稱`,`行情時間`,`最新價`,`昨收盤`,`今開盤`,`漲跌額`,`最低價`,`最高價`,`漲跌幅`,`成交量`,`成交額`,`委比`,`日期`) values('','','','','','','','','','','','','','$j')");