PDA

View Full Version : Selecting data from SQL tables.


TosaInu
08-10-2004, 11:17 AM
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?

TosaInu
08-18-2004, 05:56 PM
Hello,

Isn't this the right forum to ask or is it not clear what I asked?

TosaInu
08-31-2004, 02:48 PM
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.

rake
08-31-2004, 03:16 PM
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 :)