这是我收到的错误1064 - 您的SQL语法错误;在第1行检查与您的MySQL服务器版本对应的手册,以便在':i:sa'附近使用正确的语法'',rec_type ='',rec_request ='1',rec_by ='Victoria',batch_id = UC'SQL插入错误SQL语法... date()
另外我知道我需要在插入之前转义。我现在只是在测试。
$importwav="INSERT into names SET
com_id = '".$word_id."',
rec_date = date(d-M-y),
rec_time = date(h:i:s a),
rec_type = '".$rec_type."',
rec_request = '1',
rec_by = '".$data[8]."',
batch_id = UCASE('".$batchid."')
";
INSERT into names SET com_id = '87', rec_date = date(d-M-y),
rec_time = date(h:i:s a), rec_type = '', rec_request = '1',
rec_by = 'Victoria', batch_id = UCASE('Batch004AM')
** REC DATE可能是Y-M-d格式** – 2010-12-12 14:39:17
使单''datetime'类型的rec_date'字段和一次与'rec_date = localtime'分配日期和时间的。 – 2010-12-12 14:42:51
不要傻瓜,使用适当的日期格式 – 2010-12-12 14:50:54