Re: smarty and mysql...?
| From: | Robert Lowe | Date: | Thu, 01 May 2003 12:24:41 +0000 |
| Subject: | Re: smarty and mysql...? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9436@lists.php.net to get a copy of this message | ||
On Thu, 1 May 2003, Prince wrote:
> hi..
>
> im very new at smarty use but it doesnt look massivly complicated (i hope) my question is how
> would a person use mysql with smarty? where would i put all of the sql code for it at?
>
> tnx
>
You would do all your database stuff in your php file, then you would assign
the results to your smarty object. After you did that, display your template
file, which should handle whatever format you send your results in.
It works really well, and that way all your SQL is contained within your
php script and all the output in your template.
So I guess the answer is, you don't really put your SQL in smarty, you just
send your results to smarty and tell it how to handle them in the template.
--Bob
--
geek[0]: "It frustrates me how web services are often described as
revolutionary, when built on technologies such as UDDI and WDSL which in
turn are based on relatively mature technologies such as XML and HTTP."
geek[1]: "Remember, revolutionary also means to go in circles."