I can't for the life of me figure this out.
I have a table that lists events and using the MysQl Date format (ie 0000-00-00 ). This determines the date the event is happening on.
Im guessing its a mix of php and Mysql queries.
Even if today is x day of the week (ie tue,wed, fri) I want to be able to show the events of the Monday (if there are any). How can I construct a query to show events on Monday no matter what day of the week it is?
How can I show the events of the following Monday (, say if today is Wed)?
I know in php you can use:
$mon = mktime(0,0,0,date("m"
,(date("d"
-(date("w"
-1)),date("Y"
);
$mon_db = date("Y-m-d", $mon);
To determine the monday of the current week. How can I incoporate this into a mysql query? Also modify it to find the next Monday's events?
I have a table that lists events and using the MysQl Date format (ie 0000-00-00 ). This determines the date the event is happening on.
Im guessing its a mix of php and Mysql queries.
Even if today is x day of the week (ie tue,wed, fri) I want to be able to show the events of the Monday (if there are any). How can I construct a query to show events on Monday no matter what day of the week it is?
How can I show the events of the following Monday (, say if today is Wed)?
I know in php you can use:
$mon = mktime(0,0,0,date("m"
$mon_db = date("Y-m-d", $mon);
To determine the monday of the current week. How can I incoporate this into a mysql query? Also modify it to find the next Monday's events?