how do I get month from date in mysql

You were close – got the comparison backwards (assuming startDate is a DATETIME or TIMESTAMP data type): SELECT * FROM table WHERE amount > 1000 AND MONTH(dateStart) = {$m} Caveats: Mind that you are using mysql_escape_string or you risk SQL injection attacks. Function calls on columns means that an index, if one exists, can not … Read more