View Single Post
  #4 (permalink)  
Old May 28th, 2007, 15:44
masonbarge's Avatar
masonbarge masonbarge is offline
Highly Reputable Member
Join Date: Jan 2006
Location: Atlanta GA
Posts: 631
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help urgently needed - bogus (?) error message

Bah, should have read to the bottom before I looked for the problem. Glad you found it.

You know, you don't need to concat and backtick PHP queries (at least in PHP 5 and later mysql 4, you might have to test it on your config):

PHP: Select all

$query "INSERT INTO `comments` ( `ID` , `eventID` , `name` , `comment` ) " "VALUES (NULL , '".$eventid."', '".$postname."', '".$postmsg."')"
SQL will read the variable values even if they are in single quotes
PHP: Select all

$query "INSERT INTO comments ( ID,eventID,name,
comment) VALUES (NULL,'$eventid','$postname','$postmsg')"

Also, when you're posting code on the forum, it's a gazillion times easier to read if you use the Enter key to break up long lines and eliminate that horizontal scrollbar.
Reply With Quote