The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
Can someone help ?
I'm trying to write good code, keeping queries to a minimum etc. What I want to do is take a query which returns an array, then you do a while loop to cycle through the array. Is there anyway to crossreferece this with another array without putting it into the loop ? Lets post an example, it will probably help, lol If you take the karma hack, usercp bit. PHP Code:
PHP Code:
PHP Code:
$karmas[whoadded] who return the array $karma[whoadded] who return the id's one by one in the while loop What if I wanted to return the username of the user. I would have to do something like PHP Code:
$karma[whoadded] = userid $karma[username] = username I hope I have explained this, can anyone help please ? Am I right I can do this using 2 queries ? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|