Hi,
I'm getting an error 1064 when trying to delete some rows from a table.
SQL is:
Error is:
PHP is:
[PHP]foreach($remova ls as $id)
$sql .= "\nDELETE FROM images WHERE image_id = ".$id." AND plant_num = ".$_REQUEST['pid']." LIMIT 1;"; [/PHP]
I'm getting an error 1064 when trying to delete some rows from a table.
SQL is:
Code:
DELETE FROM images WHERE image_id = 803 AND plant_num = 2277 LIMIT 1; DELETE FROM images WHERE image_id = 804 AND plant_num = 2277 LIMIT 1; DELETE FROM images WHERE image_id = 805 AND plant_num = 2277 LIMIT 1;
Could not update the database:
1064: 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 '; DELETE FROM images WHERE image_id = 804 AND plant_num = 2277 LIMIT 1; DELETE F' at line
1064: 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 '; DELETE FROM images WHERE image_id = 804 AND plant_num = 2277 LIMIT 1; DELETE F' at line
[PHP]foreach($remova ls as $id)
$sql .= "\nDELETE FROM images WHERE image_id = ".$id." AND plant_num = ".$_REQUEST['pid']." LIMIT 1;"; [/PHP]
Comment