Error

Error executing query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'dd01 AND webcal_entry.cal_date <= dd31 ORDER BY webcal_entry.cal_time, webca' at line 1

SELECT webcal_entry.cal_name, webcal_entry.cal_description, webcal_entry.cal_date, webcal_entry.cal_time, webcal_entry.cal_id, webcal_entry.cal_ext_for_id, webcal_entry.cal_priority, webcal_entry.cal_access, webcal_entry.cal_duration, webcal_entry_user.cal_status, webcal_entry_user.cal_login FROM webcal_entry, webcal_entry_user WHERE webcal_entry.cal_id = webcal_entry_user.cal_id AND webcal_entry_user.cal_status IN ('A','W') AND (webcal_entry_user.cal_login = '__public__' ) AND webcal_entry.cal_date >= dd01 AND webcal_entry.cal_date <= dd31 ORDER BY webcal_entry.cal_time, webcal_entry.cal_id