The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
multiple uses of fetch_array()
I'm trying to write some code where I scan through an array multiple times. The symptoms of my code lead me to belive that only the first call to fetch_array() is being used. Are there any limts on how many times you can run fetch_array against the same array?
PHP Code:
My when I activate my plug-in, it looks like "do stuff 3" and "do stuff 5" are being ignored. If this is a limitation, any suggestions on an alternative? Thanks! |
#2
|
|||
|
|||
Each time fetch_array is called it moves an internal pointer to the next set of data. The way you have it set up, when the pointer reaches the last set of data the while loop ends. In order to do what you want you would need to use data_seek to move the internal pointer back to the first position after each while loop.
|
#3
|
|||
|
|||
RLShare-
Works like a champ now! Thanks for the info! |
#4
|
||||
|
||||
You could store all the data into a variable in the first loop, then just loop this variable. I'm guessing it would be slightly faster - but I am not sure.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|