只需要获取当前周的记录。创建的列格式为“ 2013-11-13 00:00:00
”
SELECT COUNT( * ) AS con
FROM `accounts`
WHERE `description` LIKE '%Earned%' AND created = __________
只需要获取当前周的记录。创建的列格式为“ 2013-11-13 00:00:00
”
SELECT COUNT( * ) AS con
FROM `accounts`
WHERE `description` LIKE '%Earned%' AND created = __________
SELECT COUNT( * ) AS con
FROM `accounts`
WHERE `description` LIKE '%Earned%'
AND yearweek(created) = yearweek(curdate())
SELECT COUNT( * ) AS con
FROM `accounts`
WHERE `description` LIKE '%Earned%' AND
WEEK(created) = WEEK(curdate()) AND
YEAR(created) = YEAR(curdate())