Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

nesting sql-result

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty Development
View previous topic :: View next topic  
Author Message
Rumborak
Smarty n00b


Joined: 08 Oct 2003
Posts: 1

PostPosted: Wed Oct 08, 2003 12:01 pm    Post subject: nesting sql-result Reply with quote

Hi all,

IŽd wonder how it is possible to show the result of a query on two tables using smarty. For example if I have one table that contains groups an a second table that contains articles (or users or whatever). The second table contains a foreign key refering to the groups-table.

So I do a query on the first table: "SELECT * FROM groups"; then a query on the second table: "SELECT * FROM users WHERE group_id = [groups.id]"

Both the amount of groups and users per group can vary. How can I display the result on my page?
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty Development All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP