1
我發現了兩個類似的答案如何在MySQL中每個月7:15-12:15查詢一次?
SELECT Count(*)
FROM fd_member
WHERE From_unixtime(Unix_timestamp(add_time), '%h') >= 8
AND From_unixtime(Unix_timestamp(add_time), '%h') < 12
GROUP BY CONVERT(add_time, CHAR(10))
SELECT *
FROM fd_member f
WHERE Date(f.date) >= Date('2013-10-01')
AND Date(f.date) < Date('2013-11-01')
AND Hour(f.date) >= Hour('8:00:00')
AND Hour(f.date) < Hour('12:00:00')
但是他們並不是精確到分鐘。
@Tiny thankyou非常多 – Vainlyh