MYSQL Select rows where date is older than datetime

我怕爱的太早我们不能终老 提交于 2019-11-30 17:51:50
 select status_column from your_table
 where added_date < '2012-05-12'

mysql DATETIME type is used for values that contain both date and time parts.

Try this

SELECT datecolumn 
FROM table
WHERE datetime_date > '2012-05-12 01-32-56'

try this

$today = date('Y-m-d');

 SELECT column_name FROM table_name WHERE year(added_date) > $today AND month(added_date) > $today
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!