Mysql reads data from today, tomorrow, workday, weekend, this week, next week, and next month if ($ date !) {Switch ($ date) {date_add plus date_sub minus case today: $ where. ANDFROM_UNIXTIME (starttimefrom, % Y-% m-% d) curdate (); break; case tomorrow: $ where. ANDFROM_UNIXT
Mysql reads data from today, tomorrow, workday, weekend, this week, next week, and next month if ($ date! = '') {Switch ($ date) {// date_add plus date_sub minus case 'today ': $ where. = "AND FROM_UNIXTIME (starttimefrom, '% Y-% m-% D') = curdate ()"; break; case 'Tomorrow': $ where. = "AND FROM_UNIXT
Mysql obtains data from today, tomorrow, workday, weekend, this week, next week, and next month.
If ($ date! = '') {Switch ($ date) {// date_add plus date_sub minus case 'today ': $ where. = "AND FROM_UNIXTIME (starttimefrom, '% Y-% m-% D') = curdate ()"; break; case 'Tomorrow': $ where. = "AND FROM_UNIXTIME (starttimefrom, '% Y-% m-% D') = date_add (curdate (), interval 1 day)"; break; case 'workday ': $ where. = "AND dayofweek (FROM_UNIXTIME (starttimefrom) not in ()"; break; case 'weekend ': $ where. = "AND dayofweek (FROM_UNIXTIME (starttimefrom) in (1, 7)"; break; case 'Week': $ where. = "and yearweek (FROM_UNIXTIME (starttimefrom, '% Y-% m-% D') = YEARWEEK (now ()"; break; case 'Week': $ where. = "AND (FROM_UNIXTIME (starttimefrom, '% Y-% m-% D')> = SUBDATE (CURDATE (), DATE_FORMAT (CURDATE (),' % W ') -1) AND FROM_UNIXTIME (starttimefrom, '% Y-% m-% D') <= SUBDATE (CURDATE (), DATE_FORMAT (CURDATE (),' % W ') -7) "; break; case 'Next month': $ where. = "AND FROM_UNIXTIME (starttimefrom, '% Y-% m') = date_format (DATE_add (curdate (), INTERVAL 1 MONTH),' % Y-% m ')"; break; default :}}
?