Re: [SMARTY] SQL-querys in templats

From: Date: Fri, 19 Apr 2002 11:35:34 +0000
Subject: Re: [SMARTY] SQL-querys in templats
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3807@lists.php.net to get a copy of this message
This kind of thing (loading data from a database) is usually done in the php script that calls Smarty, not in the template itself. One of the principal ideas behind Smarty is to separate the skill sets of the Developer (php, sql) and the Designer (html). Examples of use of Smarty w/ DB can be found at http://www.zend.com/zend/tut/tutsweatpart1.php . Regards, Jason ----- Original Message ----- From: "Marcel Güttler" <guettler@kemper-schlomski.de> To: <smarty-general@lists.php.net> Sent: Friday, April 19, 2002 6:19 AM Subject: [SMARTY] SQL-querys in templats > Greetings, > > is where a function in Smarty to loop throw a query by using template code, > like: > > {sql qury="select * from table" name=submenu loop=$subimages} > > {section name=submenu loop=$subimages} > $subimages[submenu].url} - {$subimages[submenu].caption} > {/section} > > > thanks, > > Marcel > > > > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.smarty.general (#3807) next »