//当subday=1的时候调用1天内的文章
//当subday=2的时候调用昨天的文章
//当subday=3的时候调用2天前得所有文章
//当subday=7的时候调用7天内得所有文章
if($subday > 0) { if($subday == 1) { $ntime = gmmktime(0, 0, 0, gmdate('m'), gmdate('d'), gmdate('Y')); $limitday = $ntime - ($subday * 24 * 3600); $orwheres[] = " arc.senddate > $limitday "; } else if ($subday == 2) { $ntime = gmmktime(0, 0, 0, gmdate('m'), gmdate('d'), gmdate('Y')); $limitday = $ntime - ($subday * 24 * 3600); $lomitday = $ntime; $orwheres[] = " arc.senddate > $lomitday && arc.senddate < $limitday"; } else if ($subday == 3) { $ntime = gmmktime(0, 0, 0, gmdate('m'), gmdate('d'), gmdate('Y')); $limitday = $ntime -($subday * 24 * 3600)+(1*24 * 3600); $orwheres[] = " arc.senddate $limitday "; } } }