主页 > 运维运营 > Mysql >
发布时间:2015-07-11 作者:apizl 阅读:175次
取一个星期数据
SELECT * FROM phome_ecms_movie
   WHERE add_date<=  UNIX_TIMESTAMP(DATE_ADD(CURDATE(), INTERVAL -7 DAY)) ORDER BY id DESC;

取一天数据
SELECT * FROM phome_ecms_movie
   WHERE add_date<=  UNIX_TIMESTAMP(DATE_ADD(CURDATE(), INTERVAL -1 DAY)) ORDER BY id DESC;
文章由爱资料原创本文地址:https://www.apizl.com/archives/view-860-1.html,转载请以链接形式标明本文地址!
关键字词: