I have two columns, Start_Date and End_Date in a table. I need to do a query to see if today is between them…
Is this the way to go about it?
select * from coupon where DATE() >= Start_DATE and DATE() <= End_Date;
I have two columns, Start_Date and End_Date in a table. I need to do a query to see if today is between them…
Is this the way to go about it?
select * from coupon where DATE() >= Start_DATE and DATE() <= End_Date;
change DATE() to CURDATE()
… or better yet, CURRENT_DATE