SELECT * FROM villes_france_free WHERE (ville_nom_soundex=SOUNDEX('Pontonx-sur-l'Adour') OR ville_nom_reel LIKE 'Pontonx-sur-l'Adour' OR ( ville_nom_alt !='' AND ville_nom_alt LIKE '%Pontonx-sur-l'Adour%' )) and ville_code_postal LIKE '%40465%' 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 '') OR ville_nom_reel LIKE 'Pontonx-sur-l'Adour' ' at line 2