Invalid query: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 5nWhole query: SELECT Persons2, Persons4, Persons3, Persons5, Persons51, Persons52, Persons51eng, Persons6, Persons7, Persons8, Persons9, places.Places1, countries.Countries1 FROM persons LEFT JOIN places ON Persons11=places.PlacesID LEFT JOIN countries ON Persons12=countries.CountriesID WHERE PersonsID=