Database query failed: Incorrect DATE value: ''

Last SQL query: SELECT AS game_id, gp.team_id, g.phaze_id, AS phase_name, p.type AS phase_type, g.comp_id as comp_id, AS comp_name, AS sport_name,, c.image, AS gname,, gp.score, g.type AS game_type, as location, g.time, g.status, g.period_id, t.is_guest, g.davis, g.submatch, cmp.ghost_play as in_play FROM games AS g INNER JOIN game_participants AS gp ON gp.game_id = INNER JOIN teams AS t ON gp.team_id = INNER JOIN clubs AS c ON t.club_id = INNER JOIN competitions AS cmp ON g.comp_id = INNER JOIN phazes AS p ON = g.phaze_id INNER JOIN sports AS s ON = cmp.sport_id LEFT JOIN location AS loc ON = g.location WHERE g.type!='DAVIS' and DATE(g.time) = '' AND cmp.season_id = 19 AND cmp.sport_id = 21 ORDER BY g.time ASC, location, DESC,,