Unable to connect to database- Command: SELECT which, cur_timestamp, poll_id, poll_state, poll_permalink, poll_post_date, cp_category_id, priority, YEAR(poll_post_date) AS year, MONTH(poll_post_date) AS month FROM ( SELECT 'poll' AS which, cur_timestamp, poll.poll_id AS poll_id, poll.poll_geography AS poll_state, poll.poll_permalink AS poll_permalink, poll.poll_post_date AS poll_post_date, category_poll.cp_category_id AS cp_category_id, poll.priority AS priority FROM poll, category_poll WHERE category_poll.cp_poll_id = poll.poll_id AND poll.exclude = 0 AND category_poll.flag = 'poll' AND category_poll.cp_category_id = AND ( poll.poll_post_date like '2012-06%' ) UNION SELECT 'other_poll' AS which, cur_timestamp, other_poll.other_poll_id AS poll_id, other_poll.other_poll_geography AS poll_state, other_poll.other_poll_permalink AS poll_permalink, other_poll.other_poll_post_date AS poll_post_date, category_poll.cp_category_id AS cp_category_id, other_poll.priority AS priority FROM other_poll, category_poll WHERE category_poll.cp_poll_id = other_poll.other_poll_id AND other_poll.exclude = 0 AND category_poll.flag = 'other_poll' AND category_poll.cp_category_id = AND ( other_poll.other_poll_post_date like '2012-06%') ) AS fa ORDER BY fa.poll_post_date DESC, fa.priority ASC, fa.cur_timestamp DESC, fa.poll_id DESC LIMIT 0, 20 MySQL Error: 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 'AND ( poll.poll_post_date like '2012-06%' ) UNION SELECT 'other_poll' AS whic' at line 2
