|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Rumborak Smarty n00b
Joined: 08 Oct 2003 Posts: 1
|
Posted: Wed Oct 08, 2003 12:01 pm Post subject: nesting sql-result |
|
|
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 |
|
|
|
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
|