Quote:
|
Quote:
Pass it on as a link to this thread. |
Quote:
If I was gonna have a vbulletin 3.5 change tutorial on my site I would definatly make my own. |
Quote:
|
Quote:
Anyway thanks for the great tutorial :) |
Quote:
Quote:
|
I need to make a query (from the table user) that returns an array and the key of the array would be the userid and the value would be the value of another field in the database (eg referrerid).
For example if the array is $array and the users with userid 100, 200, 300 have a referrerid of 1,1 and 50 respectively that array should have the values $array[100]=1 $array[200]=1 $array[300]=50 Is that hard? How can I do it without adding many queries? Thanks a lot in advance :) edit: [offtopic] OMG I just saw you are 16!!! Wow! I'd never had expected that! I thought you were about 25+! OMG, most 16 year olds in Greece do not know how an opening tag of php is and generally they only care about playing games... Of course there are exeptions, like my bf which is in that age but still there is a huge difference... OMG, I still can't believe it! [/offtopic] Nevermind, I figured out another way to get the results I wanted :) |
That could be done with just one query. :)
PHP Code:
Quote:
EDIT: Quote:
|
Something similar but WAY more messy than yours :o
However the 100,200,300 where just examples, in an actual forum it should go through all the userids :) Well, that's not very hard to change, I'll just put instead of your WHERE a WHERE referrerid>0 (cause I want it to only return the users with a referrer) :) Thanks so much!! That's much more organized than my code. I'm still trying to figure out how those SQL things work, it's quite hard :nervous: edit: And it works too! Woo hoo!! :D Thanks, thanks, thanks!!! :D :D :D |
np, and what are you trying to make, if it's not a secret? :)
|
All times are GMT. The time now is 12:04 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|