æ±æ¬å¨çå¼å§åç»ææ¶é´
$w = date('w',time()) - 1;
$start_time = time() - $w * 60 * 60 * 24; //ææä¸çæ¶é´æ³
$end_time = time() + (6 - $w) * 60 * 60 * 24; //ææ天çæ¶é´æ³
M('tablename')->where("create_time >= {$start_time} and create_time <= $end_time")->select();
æ份çä¹å¾ç®åäºï¼æ±åºæ¬æå¼å§åç»æçæ¶é´ï¼ç¶åå¨æ ¹æ®æ¶é´æ¥è¯¢å°±å¯ä»¥äº