SELECT score_home, score_guest, id_home, id_guest, overtime, shootout FROM new_match `m` LEFT JOIN new_league `l` ON (m.id_league = l.id_league) WHERE m.date>l.date AND playoff='0' AND id_home= AND score_home >= 0 AND score_guest >= 0You 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 score_home >= 0 AND score_guest >= 0' at line 1SELECT score_home, score_guest, id_home, id_guest, overtime, shootout FROM new_match `m` LEFT JOIN new_league `l` ON (m.id_league = l.id_league) WHERE m.date>l.date AND playoff='0' AND id_guest= AND score_home >= 0 AND score_guest >= 0You 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 score_home >= 0 AND score_guest >= 0' at line 1