PDA

View Full Version : mysql error


AN-net
04-07-2004, 11:03 PM
ok dont get wuts wrong with it>_<

heres my php mysql query

$DB_site->query("INSERT INTO ".TABLE_PREFIX."thread (title, lastpost, forumid, open, replycount, postusername, postuserid, lastposter, dateline,
iconid, visible, attach, similar) VALUES ('".addslashes($info['entry_name'])."','".$lastcomment['comment_date']."','".intval($info['forumid']).",'1','".$numcomments['totalcomments']."','".addslashes($info['artistname'])."','".$info['artistid']."','".addslashes($lastcomment['commenter'])."','".$info['entry_date']."','0','1','0','".addslashes($similarthreads)."')");

heres the syntax 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 '1','1','','','Antonbomb22','0','0','1','0','')'

Boofo
04-07-2004, 11:13 PM
It looks like this is not displaying anything:

".intval($info['forumid'])."

But I could be wrong. I usually am. ;)

Dean C
04-08-2004, 10:25 AM
'".intval($info['forumid'])."'


You're missing an apostrophe ;)