I'd say the first method is more efficient, because you only use one command to fetch all data.
With the second one, you can only get one variable per fetch. So, if you want to get more variables, you'd have to add lines in the second method:
$variable1 = $row["variable1"];
$variable2 = $row["variable2"];
$variable3 = $row["variable3"];
Get one variable from sql:
$query="select address from diary where (id='$id')";
$result=mysql_query($query);
$array=mysql_fetch_array($result);
$address=$array["address"];
thx,
Dik