MYSQL根据今天的日期检索数据

时间:2014-08-25 12:49:43

标签: mysql

我已经尝试了以下这样的查询,假设今天的日期是25:

查询1

    SELECT m.member_name, m.mobile FROM member m, `club_name` c WHERE m.cabinet = 1 
and c.wmmr_report=0 and m.club_name=c.id and DAY(NOW()) > 26

QUERY2

    SELECT m.member_name, m.mobile FROM member m, `club_name` c WHERE m.cabinet = 1 
and c.wmmr_report=0 and m.club_name=c.id and DAY(CURDATE()) > 26

但是在这两种情况下都会返回数据,好像我有not used DAY(NOW()) > 26DAY(CURDATE()) > 26

0 个答案:

没有答案