Si potrebbe fare anche $array=mysql_fetcharray($query) così poi hai un array associativo con indici i nomi dei campi del db

Ciao