|
Posted by Rik on 10/28/72 11:45
william.clarke@gmail.com wrote:
>>> $result = mysql_query(some_query);
>>> while(mysql_fetch_array($result,MYSQL_ASSOC){
>>> //do stuff with it
>>> }
>> In the below, say I did whatever I wanted to do to with this record, ie.,
>> retrived a city to a temp variable. How do I move or goto the next
record?
That's what you do with mysql_fetch_array().
> As milahu and Rik said this is PHP looping through a result
> set...(maybe not in the VB sense). There isn't a direct equivalent to
> the VB6 recordset, but you don't need one.
Don't know much about VB, but if you want to handle it as a complete
recordset: instead of processing the rows one by one:
$myrecordset = array();
while($row = mysql_fetch_array($result,MYSQL_ASSOC){
$myrecordset[] = $row;
}
Et voilΰ, a multidimensional array to abuse as you which.
Grtz,
--
Rik Wasmus
Navigation:
[Reply to this message]
|