我在我的数据库中有两个日期和时间列。我想行,其中日期是大于或等于当前日期和当前时间mysql查询检查大于日期和时间
我用下面的查询来获得结果
SELECT DISTINCT
A.appt_fromUser,A.date,A.time,A.appt_styleType,B.*,A.appt_shoutID,A.shout_status
from appoint_db A
INNER JOIN checkedin_db B ON A.appt_id=B.appid
where A.appt_toUser='$userid'
and A.date>='$date'
and InChair='0'
and A.time>='$time'
然而,由于我所希望的,这是行不通的。
例如,如果我有两行:
2012/05/30时间:6.00
2012/05/30时间:13.00
我查询这个以2012/05/02的日期和时间:12:00,它只返回时间大于12:00的行