allora ti basta solo mettere questo
Codice PHP:
$query=mysql_query($sql1);

while (
$res=mysql_fetch_assoc($query))
{
print_r($res);