我一直在盯着這個東西一會兒,我似乎無法弄清楚語法錯誤是什麼。我以前曾經遇到過這種情況,而且上次這種情況非常簡單,我後來覺得很蠢。但這裏的另一個嘗試:ADD附近的SQL語法錯誤
//update database
$q = "
UPDATE
users
SET
id='$edit_id',
name='$edit_name',
bdm='$edit_bdm',
add='$edit_add',
pc='$edit_pc',
location='$edit_outletL',
style='$edit_outletS',
coName='$edit_coName',
coNum='$edit_coTel',
coEmail='$edit_coEmail',
password='$edit_pass'
WHERE
id='$query_title'
";
$edit_query = mysql_query($q) or die("Database Query Error: ". 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 'add='Llancadle, Nr Barry', pc='CF62 3AQ', location='rural', style='food', coName' at line 1
`ADD`是保留關鍵字。 – Bobby 2011-01-11 10:18:59
通過像「add」一樣將它們圍起來進行重複字段名稱跳轉 – Nishant 2011-01-11 10:20:42