看板 PHP 關於我們 聯絡資訊
最近在更新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
timyau:你先在MySQL的 Query Browser或Command line下執行SQL指令 05/13 23:35
timyau:看看是否正確吧... 05/13 23:35