Error in query: SELECT customer.*, EXTRACT(EPOCH FROM customer.created) as unixcreated, country.name as cname WHERE customer.id= AND country.id=customer.country_id AND customer.status_id='3' AND customer.id!='77' ORDER BY customer.partner_level ERROR: syntax error at or near "AND" LINE 4: country.name as cname WHERE customer.id= AND country.id=cu... ^