The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
Well, you aren't using the same code if you have added changes, which is why I asked for it again.
What have you done debug-wise. Have you tried printing out $unames before you've done anything to it? What do you get? |
#12
|
|||
|
|||
I have tried to print it out and all I get is one name only. Which is from the last entry in the database.
|
#13
|
||||
|
||||
If you are printing out what is coming out of the database and only getting one item, then that means your query must be wrong if you think it is supposed to be getting several items.
But wait.... you are in a while loop - it only goes through one row per loop. Sounds to me like you need to group things by userid and then for each userid print out stuff. |
#14
|
|||
|
|||
Lynne, as much as I enjoy talking about a solution, let me provide you with the code and maybe you can suggest changes to it. This is the entire php line for the page I am wanting to the display of usergroups on.
PHP Code:
|
#15
|
||||
|
||||
Well, it depends on how open you are to what this list looks like. I'd group the query results by userid (look up Group for Mysql queries). Then, when going into my while loop, I'd see if the userid is the same as the previous userid (save the userid in the loop). If it isn't the same, I'd print out the name, title, whatever and then the first usergroup name. Then when you do the loop again, if the userid is the same as the previous one, just print out the new usergroup name. Once the userid is not the same as the previous one, it does a line break and prints the new name, title, whatever.
|
#16
|
|||
|
|||
The list is of files that have been added and are in queue to be approved. It will display the name of the submitter, the file name, the file type, the usergroups that have permission to view the file, etc. So its not based on a userid its a matter of matching up usergroupid's from the file listing table with that of the usergroup table then displaying the appropriate name for each usergroupid no matter how many usergroupid's exist for that one file.
|
#17
|
||||
|
||||
Well, you know your database and this issue better than I, but you should be able to 'group' these in some way and then do it the way I said (group by file id?).
|
#18
|
|||
|
|||
EDIT: I'm a jack ass, I can only say that I learn by coding examples better than question and answer.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|