when running through a result set, how efficient is this approach as compared to other methods?
for ($iCont=0; $iCont < mysql_num_rows($this->rsQuery); $iCont++)
{
mysql_data_seek($this->rsQuery,$iCont);
$row=mysql_fetch_assoc($this->rsQuery);
//more things here like write row or push it to a global array
}
Is there any efficiency problem using mysql_data_seek even if it’s done in an ordered sequence?
How about mysql_num_rows() at the beginning? does is affect?
So, are there better approaches?
What I want to implement is a method to return an associative array with all the result set content and another one to create a grid (html table) with the data.
Thank you
I’m not sure it this is more efficient but looks nicer