Invalid sqlToArray query: SELECT amt_dealers.*, amt_countries.title AS country , amt_states.title AS state FROM amt_dealers LEFT JOIN amt_countries ON amt_dealers.country_id = amt_countries.id LEFT JOIN amt_states ON amt_dealers.state_id = amt_states.id WHERE country_id = http