Delete from DB if not in array

PHOTO EMBED

Tue Mar 02 2021 10:31:38 GMT+0000 (Coordinated Universal Time)

Saved by @vskand #prestashop #delete #mysql #db #database #ids

Db::getInstance()->executeS("DELETE FROM product_images WHERE id_product NOT IN (" . join($allProductIds,',') . ")")
content_copyCOPY