$query.="WHERE u.level >=7 "; $query.="AND u.level <=10 "; $query.="ORDER BY u.id_level DESC, u.id ASC";