Wrong SQL: SELECT EventID, event_cat, event_cat2, ticket_url, event_status, event_name, event_desc, start_date, start_time, end_time, venue, img_thumb FROM Events WHERE UNIX_TIMESTAMP(start_date) >= AND UNIX_TIMESTAMP(start_date) <= AND event_status = 'Approved' ORDER BY start_date, start_time, EventID ASC Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND UNIX_TIMESTAMP(start_date) <= AND event_status = 'Approved' ORDER BY start_' at line 1256