11-06-2007, 02:29 AM
|
#6 (permalink)
|
|
The Addict
Join Date: Nov 2007
Posts: 282
Thanks: 61
|
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());
|
|
|
|