xxxselect id, es, asc_3, asc_6, geotype_id from keops.geoplaces where id and (asc_6 in (497944810,497944297,497944123,497944058,497943977,497943722) ) and important_6=1 and (geotype_id!=9 and geotype_id!=153 and geotype_id!=154 and geotype_id!=155) order by important_1 DESC, important_2 desc, important_3 desc, rand() limit 30 Array ( )