Warning: implode() [function.implode]: Bad arguments. in /usr/home/desbrina/public_html/mt/users/master.php on line 72
UPDATE user_inventory set status = 'mastered' WHERE ID IN()
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 ')' at line 1
I get that error with this code
$sql = "UPDATE user_inventory set status = 'mastered' WHERE ID IN(".implode(', ', $ids).")";
$result = mysql_query($sql) or echo($sql."<br />".mysql_error());
print_r($ids);
IDs are entered via
$ids = array();
while($row = mysql_fetch_array($sql)) {
$ids[] = $row['ID'];
}
I'm a bit confused since it was working fine yesterday