[請益] Mysql Syntax Error
最近在更新Mysql資料庫
將mysql版本從3.23更新到4.1
也將php從4.3.4RC1更新到5.0.4
資料庫看起來沒什麼問題
不過在執行PHP程式時 出現以下錯誤
Could not run query: 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 'check='1'' at line 1
程式碼如下:
$sql="select count(*) from $friend where check='1'";
$result=mysql_query($sql,$db);
if(!$result) {
echo 'Could not run query: ' . mysql_error();
exit;
}
請問是版本更新所造成的問題嗎? 懇請各位大大回答
謝謝各位!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.116.5.64
推
05/13 23:35, , 1F
05/13 23:35, 1F
→
05/13 23:35, , 2F
05/13 23:35, 2F
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):