过期日期列exDate的日期格式为(Y-m)或YYYY-MM,例如:2018-03。
我正在尝试这个查询,但它从表中获取所有记录。SELECT * FROM product WHERE (exDate BETWEEN DATE_FORMAT(NOW() ,'Y-m') AND NOW()+ interval 2 month)
$qry ="select date(created_at) as Date,count(id) as Value from performances where date_format(created_at,'%d-%m-%Y') >= '$start_date' and date_format(created_at,'%d-%m-%Y') <= '$to_date' group by