How to use greater than operator with date?

前端 未结 6 1702
鱼传尺愫
鱼传尺愫 2020-12-05 03:36

No idea what is going on here. Here is the query, right from phpMyAdmin:

SELECT * FROM `la_schedule` WHERE \'start_date\' >\'2012-11-18\';
6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-05 04:05

    Adding this since this was not mentioned.

    SELECT * FROM `la_schedule` WHERE date(start_date) > date('2012-11-18');

    Because that's what actually works for me. Adding date() function on both comparison values.

提交回复
热议问题