现在我有本周的拉动数据,但是星期一星期一开始,我想在星期一开始这一天我该怎么做?
$result = mysql_query("SELECT * FROM form_2 WHERE week(timestamp) = week(NOW())");
答案 0 :(得分:44)
根据docs,使用WEEK(timestamp,1)
答案 1 :(得分:4)
您可以尝试:"SELECT * FROM form_2 WHERE week(timestamp - INTERVAL 1 DAY) = week(NOW() - INTERVAL 1 DAY)"