Could not do query on db admin_origin: SELECT COUNT(*) AS total FROM wow_raids WHERE raid_date >= DATE(NOW()) AND raid_id IN (SELECT DISTINCT(raid_id) FROM wow_raid_signs s LEFT JOIN wow_characters c ON s.character_id = c.character_id WHERE user_id = ) ! 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 ')' at line 1