SELECT COUNT(*) AS numTurns FROM wacdb_turns WHERE wacdb_turns._season = AND wacdb_turns._kickoff <= NOW() --- 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 'AND wacdb_turns._kickoff <= NOW()' at line 1 ---