大家好)我有桌子和几排。如何打印特定日期的所有结果?具体日期如下 - 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行中。
答案 0 :(得分:0)
select ...
from ...
where real_time = '2013-01-30'