SELECT dateofbooking, count(id) AS total FROM participant WHERE dateofbooking >= $datepick AND
dateofbooking <= DATE_ADD($datepick, INTERVAL 5 DAY)GROUP BY dateofbooking;
$from = date('Y-m-d');
$to = date('Y-m-d',strtotime("5 day"));
SELECT dateofbooking, count(id) AS total FROM participant WHERE `dateofbooking` BETWEEN '$from' AND '$to' GROUP BY dateofbooking;
1条答案
按热度按时间bihw5rsg1#
使用此代码