Please help. My eyes are going numb. My body weak.
Attempt #9432
Taken from this answer MySQL delete multiple rows in one query conditions unique to each row
DELETE FROM `productimages` WHERE (`ID`,`imageURL`)
(179,'http://www.example.com/example1.jpg')
(179,'http://www.example.com/example2.jpg')
(179,'http://www.example.com/example3.jpg')
(179,'http://www.example.com/example4.jpg')
(179,'http://www.example.com/example5.jpg'))
Failed.
#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 '((179,'https:// . . .
Referencing my archive, on 02/14/96 - on attempt #387 I discovered that you cannot use multiple WHERE
clauses in one query. I next tried
Attempt #837
DELETE FROM `productimages` (WHERE `productID` = 179 AND `imageURL` = 'http://www.example.com/example1.jpg')
(AND `productID` = 179 AND `imageURL` = 'http://www.example.com/example2.jpg')
(AND `productID` = 179 AND `imageURL` = 'http://www.example.com/example3.jpg')
(AND `productID` = 179 AND `imageURL` = 'http://www.example.com/example4.jpg')
(AND `productID` = 179 AND `imageURL` = 'http://www.example.com/example5.jpg')
(AND `productID` = 179 AND `imageURL` = 'http://www.example.com/example6.jpg')
#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 '(WHERE 'productID' = 179 AND 'imageURL' = 'https:// . . .
A more recent attempt, my closest yet:
Attempt #10473
DELETE FROM `productimages`
WHERE `productID` = 179
AND `imageURL` = 'http://www.example.com/example1.jpg'
AND `imageURL` = 'http://www.example.com/example2.jpg'
AND `imageURL` = 'http://www.example.com/example3.jpg'
AND `imageURL` = 'http://www.example.com/example4.jpg'
AND `imageURL` = 'http://www.example.com/example5.jpg'
AND `imageURL` = 'http://www.example.com/example6.jpg'
Indescribable joy. A successfully query.
Upon closer look...
0 rows affected. (Query took 0.0128 seconds.)
Again, defeated.
Has anyone gotten this far yet? You'd think there'd be a manual or something.