mysql_query("select kullanici_id, urun_id, count(urun_id) as adet from siparisler group by kullanici_id, urun_id order by kullanici_id, urun_id ");


Kolay gelsin.