【发布时间】:2011-01-24 22:08:42
【问题描述】:
我想在一年内每天获取数据,但我必须每天使用 365 次查询,例如:
for ($i = 0; $i<365; $i++){
$end_day = ...; // the end time of each day
$start_day = ...; // the start time of each day
$query = select count(*)....where created < $end_day AND created > $start_day
}
我认为我当前的解决方案使系统非常慢。有没有办法只使用一个查询?
【问题讨论】: