The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
![]()
Here's the solution I can up with that works.
PHP Code:
|
#12
|
||||
|
||||
![]()
Keep in mind, you'll be running through a table that can be a couple of thousand rows large, depending on the number of members on your board..
You should use the solution provided by MarcoH64 |
#13
|
|||
|
|||
![]()
Good point. It would make sense that it would be quicker for the DB engine to tabulate the totals rather than have PHP parse each row individually from the DB.
I'll give it a shot. Thanks! |
#14
|
|||
|
|||
![]()
I had to modify my the code of course for the new SELECT, and by tweaking the SQL statement further, I was able offload the sorting to the DB since I wanted the results displayed by the highest total to the lowest.
PHP Code:
![]() Much simpler execution to the problem. Again, many thanks! :up: |
#15
|
|||
|
|||
![]()
Sometimes the solution to something that seems complicated can be real simple.
![]() |
#16
|
|||
|
|||
![]()
this was great. I tried to do the same thing and it works perfect. thanks.
I'm wondering how to make 2 edits though: 1. exclude counting and displaying the empty fields. currently shows 500 blank. 2. not really related but, it displays whats in the field5 fine, how do I get the original field number from the select menus of the custom field? i.e. the ID that is used in the search => getall&field5=3 rather than getall&field5=orange |
#17
|
||||
|
||||
![]()
1) WHERE field5 != ''
2) SELECT data from profilefield WHERE profilefieldid=5; Then unserialize data and use the value returned by the other query as an index into this array. |
#18
|
|||
|
|||
![]()
thanks. first part worked perfect. I'm new to the whole query stuff so not sure what part 2 entails with the unserialize and using other query. I'll have to play around and with that one.
thanks for the quick response |
#19
|
||||
|
||||
![]() PHP Code:
|
#20
|
|||
|
|||
![]()
hmm.. doesn't seem to return anything? no errors though? just count number and blank. nothing for the fieldvalues.
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|