讓我們來看看在調試之前是否有人可以回答這個問題。這是一個我試圖改變的語法問題。我通常犯這個錯誤,而且我猜想爲什麼我這樣做會有幫助。MySQL語法錯誤>。<
在此先感謝!
錯誤此時:
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 ' 'Andrew', 'West', '***@gmail.com',
'7*7 **', '', ' at line 14
使用的代碼:
$db_insert = mysql_query("INSERT INTO catches (
catch_affid,
catch_firstname,
catch_lastname,
catch_email,
catch_street1,
catch_street2,
catch_city,
catch_state,
catch_postalcode,
catch_country,
catch_contactid
) VALUES (
$a,
'$f',
'$l',
'$e',
'$s1',
'$s2',
'$c',
'$s',
$p,
'$cy',
'$cid'
)");
向我們展示正在執行的實際查詢。 '$ a'是否需要加引號?確保該值是一個數字。 – sachleen 2012-07-19 22:24:40
另一方面呢?你先試試,然後如果你不能幫助你!我不認爲你會舉辦一場關於「誰先得到它」的競賽,就像你提議的:) – Sujay 2012-07-19 22:25:25
希望這不是真正的郵件地址... – rekire 2012-07-19 22:25:48