08-09-2008, 12:20 PM
|
#1 (permalink)
|
|
Super Moderator
Join Date: Sep 2007
Location: Near you.
Posts: 791
Thanks: 241
|
Syntax error here why?..
PHP Code:
function approve($items) {
$cat = mysql_real_escape_string($_POST['category']);
$ids = implode(",",$items);
$sql = "UPDATE news
SET valid = 1 AND cat_id = $cat
WHERE id IN (".$ids.")";
mysql_query($sql) or die(mysql_error());
}
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 'WHERE id IN (6)' at line 3
|
|
|
|