I am a beginner programmer who is doing his first project and they need help.
I have two mysql fields:
- Product_published = Y or N
- Product_day = date ("z"), which is the day of the year 0-365
I want 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 that is less than the current day.
So, if I have 5 products with today (350) and 5 with 349, I would like to unpublish 349 by changing " Y " to " N " in the Product_publish section . "
Best regards - Ivar Rafn
source
share