打印特定日期mysql + php的结果

时间:2013-01-30 14:15:59

标签: php mysql date

大家好)我有桌子和几排。如何打印特定日期的所有结果?具体日期如下 - 2013年1月30日。以前保存在$ date(变量)中的日期。

Google帮助了我),但是上个月......:

select id from tab where date_format(real_time, '%Y%m') = date_format(date_add(now(), interval -1 month), '%Y%m');

日期保存在TIMESTAMP行中。

1 个答案:

答案 0 :(得分:0)

select ...
from ...
where real_time = '2013-01-30'