View Single Post
Old 11-06-2007, 02:29 AM   #6 (permalink)
Nor
The Addict
 
Join Date: Nov 2007
Posts: 282
Thanks: 61
Nor is on a distinguished road
Default

Try adding back ticks.

Quote:
Oh, I see the problem now. You appear to have placed a semi-colon at the end of your SQL statement. Remove it and try again.
Doesn't really matter since most sql delimiters use a semi colon at the end.

PHP Code:
$recordset mysql_query("SELECT `id`, `date`, `title`, `description` FROM `news` WHERE `id` = " intval($_GET['id']) . " LIMIT 1;") or die(mysql_error()); 
If that don't work try adding single quotes around the id:

PHP Code:
$recordset mysql_query("SELECT `id`, `date`, `title`, `description` FROM `news` WHERE `id` = '" intval($_GET['id']) . "' LIMIT 1;") or die(mysql_error()); 
Nor is offline  
Reply With Quote