|
Posted by Jim Whitaker on 10/11/78 11:45
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?
Example in english of what I am asking:
Say the result set is as follows:
ID FROMCITY
23 CLEVELAND
24 DETROIT
I want to goto record with ID of 23 first, and store CLEVELAND in a tempvar,
so temppvar = FROMCITY.
Now, I want to move to ID 24 and store DETROIT like this:
tempvar = tempvar + " / " + FROMCITY
At this point tempvar would be CLEVELAND / DETROIT.
This is what I'm after, loop through a recordset. I mean in the background
in code, not manually do this.
You can't tell me you can't loop through a recordset using php.
> $result = mysql_query(some_query);
> while(mysql_fetch_array($result,MYSQL_ASSOC){
> //do stuff with it
> }
>
>
Navigation:
[Reply to this message]
|