我绝不经历了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