我絕不經歷了MySQL和不斷收到錯誤代碼這樣的行:神祕MySQL錯誤
$sql= "INSERT INTO songs (unique_show_id, artist, date, year, city, state, venue, taper, transfered_by, source, mic_loc, lineage, uploaded_by, uploaded_on, show_notes, show_xml)
VALUES('$showId', '$artist', '$showDate', '$year, '$city', '$state', '$venue', '$taper', '$transferer', '$source', '$mic_loc', '$lineage', '$uploader', NOW(), '$show_notes', '$show_xml')";
//check to see if the query went through
if (!mysql_query($sql,$con)){
echo "query fail";
die('Error: ' . mysql_error());
}
我敢肯定它的東西簡單,但我不能看到那裏的錯誤是。該錯誤消息我得到的是:
query failError: 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 'ipuhgbi', 'CA', '', '', '', '', '', '', 'danwoods', NOW(), '', '<show id=\'gm198' at line 2
一些我插入值是NULL,但是從我讀過,我不認爲這應該是一個問題。有任何想法嗎?
顯示替換的查詢。 – 2010-01-23 06:20:18
請在MySQL中發佈'DESCRIBE SONGS'的輸出,以便我們可以看到每列的數據類型。 – 2010-01-23 06:25:39