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

Show data of a table based upon an other table

 
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 -> General
View previous topic :: View next topic  
Author Message
Theofiel Boomerang
Smarty n00b


Joined: 22 May 2018
Posts: 3

PostPosted: Fri Jul 27, 2018 1:04 pm    Post subject: Show data of a table based upon an other table Reply with quote

Hi there,

i'm a total noob on smarty and don't know anything about it. However i sometimes need smarty, as in this case:

I want to show data from a productfeed table based upon a record that's linked on a customer database.

I have a customer database linked with a 1:n relation to a cart table. Everytime someone leaves a cart a record is created in that cart table. In that record i then get a productnumber and want to lookup the information of that product in a producttable that's daily filled with a productfeed.

Is there any method on how to do this?

Thanks!
Back to top
View user's profile Send private message
bsmither
Smarty Elite


Joined: 20 Dec 2011
Posts: 322
Location: West Coast

PostPosted: Sat Jul 28, 2018 6:58 am    Post subject: Reply with quote

I am thinking not inherently.

But, one can create an Output Filter that can determine the value of the key dynamic variable, fetch more database recordsets, process the recordsets, and populate other template variables before finally spitting out the finished HTML.
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Sat Jul 28, 2018 3:24 pm    Post subject: Reply with quote

I have feeling you don't understand the role of Smarty.
Smarty is a PRESENTATION layer, it handles the data already retrieved and arranged for presentation.
You should do all your business logic in your PHP code.
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 -> General 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