SELECT * FROM tabella WHERE a=$codice AND b=$codice2 ORDER BY RAND() LIMIT 0,5