I have a question regarding case/if statements in MySQL in regards to updating a field based on the possibility of a date in a field. I have two fields. One that contains a date ("LastDayToNotify") and one that contains a plaintext message ("NotifyMessage")
The date field can contain one of three values - An empty field, a Null, or a Date.
My question is - Is it possible, and if so how, to in MySQL to have a query that sets one field's value (NotifyMessage) based on if the date (LastDayToNotify) has passed? An example would be :
If the date has not passed (the date is today or before), update the NotifyMessage field to say "Generic Message"
but if the date field is empty, null, or it is passed it does nothing.
I've tested a couple modifactions of answers in this thread, but have been unable to successfully account for all 3 possible date scenarios. Here
I know this is probably a rookie question, but I've never encountered this particular need yet.
Thanks!