Error: SELECT * FROM ((SELECT countryName AS name, country_id, country_id AS id, 'country' AS t_type FROM module_villas_countries WHERE countryName LIKE 'mora d'ebre') UNION ALL (SELECT name, country_id, region_id AS id, 'region' AS t_type FROM module_villas_region WHERE name LIKE 'mora d'ebre') UNION ALL (SELECT name, country_id, town_id AS id, 'town' AS t_type FROM module_villas_towns WHERE name LIKE 'mora d'ebre')) AS tmp LIMIT 1

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 'ebre') UNION ALL (SELECT name, country_id, region_id AS id, 'region' AS' at line 2