SQL nonsence - SELECT * FROM pac_days_best,pac_users LEFT JOIN pac_tracks ON pac_days_best.user_id = pac_tracks.user_id WHERE date = '2017-01-30' AND pac_days_best.user_id IN() AND tournament_id = 1277 AND pac_days_best.user_id = pac_users.id ORDER BY best DESC, best_bonus DESC, sec DESC, sec_bonus DESC, soucet DESC