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 '(state = 'MI' or search_state = 'MI') GROUP BY manufacturer ORDER BY manufactur' at line 1