It is necessary to update the field in the database, but when I make a request, it writes to me "0 lines are affected", although there is a field with image , and it is empty.

 UPDATE `oc_product` SET `image`= 'no_image.png' WHERE `image`=''; 

    1 answer 1

    Try extracting the number of fields with a SELECT with exactly the same WHERE condition to make sure it works.

     SELECT COUNT(*) FROM `oc_product` WHERE `image`=''; 

    Perhaps you do not have an empty string, but NULL and need a query like

     UPDATE `oc_product` SET `image`= 'no_image.png' WHERE `image` IS NULL;