SQLを絡ませた質問です。
$query = "select * from table";
$res = mysql_query($sql);

で返ってきた$resから列名(id, name, addressなど)を取得したいのですが、どうすればよいのでしょうか?