The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Selecting data from SQL tables.
Hello,
What's the syntax to get data from a table by using data from another? It's done in PERL and it always confused me there, using ->{' '} ->{''} Example editing the postbit template: <div>$vbphrase[usergroup]: $post[usergroupid]</div> But I want to display the title for the group, not the ID. It collected data from table users and now information from table usergroups is required. <div>$vbphrase[usergroup]: $post[usergroupid->[title]]</div> does not work. What's the correct syntax? |
#2
|
||||
|
||||
Hello,
Isn't this the right forum to ask or is it not clear what I asked? |
#3
|
||||
|
||||
What I asked for appears to be a default setting: user ranks. I would however like to know how to get data from table usergroups for a given member. Do you need to make a query? How? Example please.
|
#4
|
||||
|
||||
Your understanding of queries and variables in php is a bit shaky. The data you want is already there ($post[displaygrouptitle]), but if it weren't you'd have to edit a query in the showthread.php file to obtain it. While vb's templating system is powerful, you can't query the database through it. I hope it was helpful
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|