Compare the part of the date in mysql

admin

Administrator
Staff member
Dears,

Concerning the one column "edate" (Y-mm-dd)of the table in mysql, I want to select the rows with the year and the month is greater than 2001-05 (May, 2001), such like

$sql="select * from forum where edate<='2001-05';

But there is some errors, please help me correct it, thanks

Sincerely yours,
Simon
 
Back
Top