I have a result set I pull from a large database:
$result = mysql_query($sql);
I loop through this recordset once to pull specific bits of
Using SQL Cursors you can get this approach