I am trying to create a query that SELECTS data out of a DB the has a date equal to the current month. The following query fails at: WHERE MONTH('date') = MONTH(CURDATE()) AND
$sql->query("SELECT doctor_doctor.doctor_id, doctor_doctor.first_name AS first_name, doctor_doctor.last_name AS last_name, doctor_schedule.doctor_id, doctor_schedule.schedule_date AS date, doctor_schedule.time AS time, doctor_schedule.location_id
FROM doctor_doctor, doctor_schedule
WHERE MONTH('date') = MONTH(CURDATE()) AND doctor_doctor.doctor='1' AND doctor_doctor.doctor_id=doctor_schedule.doctor_id AND doctor_schedule.location_id='1'
ORDER BY date DESC");