I've got a query that I run at the top of my page.
I then want to loop thru the results (which works the first time I do it), twice. On the second time I loop thru the same result, it does not work.
Ex:
[PHP]//data abstraction layer which returns the result - no problems here
$msResults=$bra in->sqlExe('select ','alliances_tb l','*','','','x allianceorder ASC');
//loop thru results - this works great
while(list($id, $alliance,$alli anceURL)=@mysql _fetch_row($msR esults)){
//do something
}[/PHP]
then, down the page a while
[PHP]//loop thru results a second time - this does not work
while(list($id, $alliance,$alli anceURL)=@mysql _fetch_row($msR esults)){
//do something
}[/PHP]
Can you only use a mysql result resource once? do I have to query again if I want access to the same data?
Thanks,
Greg
I then want to loop thru the results (which works the first time I do it), twice. On the second time I loop thru the same result, it does not work.
Ex:
[PHP]//data abstraction layer which returns the result - no problems here
$msResults=$bra in->sqlExe('select ','alliances_tb l','*','','','x allianceorder ASC');
//loop thru results - this works great
while(list($id, $alliance,$alli anceURL)=@mysql _fetch_row($msR esults)){
//do something
}[/PHP]
then, down the page a while
[PHP]//loop thru results a second time - this does not work
while(list($id, $alliance,$alli anceURL)=@mysql _fetch_row($msR esults)){
//do something
}[/PHP]
Can you only use a mysql result resource once? do I have to query again if I want access to the same data?
Thanks,
Greg
Comment