Hi,
I haveHow do I get date comparison in MySQL query that looks something like this:Code:$date = date("Y-m-d");
ThanksCode:SELECT expired_date
FROM subscription
WHERE expired_date > '$date'
Printable View
Hi,
I haveHow do I get date comparison in MySQL query that looks something like this:Code:$date = date("Y-m-d");
ThanksCode:SELECT expired_date
FROM subscription
WHERE expired_date > '$date'
Hi there,
An easier/cleaner way to do this is as follows:
HTH
What Pullo has said above would be better but if you need to convert a string to date in MySQL look at the STR_TO_DATE function.
pullo, using CURRENT_DATE instead of CURRENT_TIMESTAMP will more closely match the original requirements here
Thanks,
I knew I can rely on your guys here. :)