現在の週のレコードのみを取得する必要があります。作成された列の形式は ' 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 = __________
YEARWEEK()を使用
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())