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 'AND tournaments.location_id= locations.id ORDER BY tournaments.date ASC LI' at line 15