I have two custom attributes:-

  • is_featured_product => Yes/No type
  • start_to_date => Date type

Now I want to update the status of the featured product to 0 if current Date > start_to_date using Mysql query.

UPDATE `catalog_product_entity_int` set value = 0 where attribute_id = (SELECT attribute_id FROM `eav_attribute`  WHERE `attribute_code` LIKE 'is_featured_product');

How to check other(start_to_date) attribute value before update?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.