Im a novice programmer doing my own firsts project and im in need of assistance.
I have two mysql fields:
I'd like to update all "Product_published" fields in a table in my sql database.
They are all set to "Y" and I would like to update them to "N" if the "Product_day" field contains a number which is less than the current day.
So if i have 5 products with todays day(350) and 5 with 349 I would like to unpublish the 349 ones by changing "Y" to "N" in "Product_publish".
Best Regards
Ivar Rafn
Use:
UPDATE YOUR_TABLE
SET product_published = 'N'
WHERE product_day < 350
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With