Re: sections
| From: | Ernani Joppert Pontes Martins | Date: | Mon, 23 Sep 2002 07:54:32 +0000 |
| Subject: | Re: sections | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-6007@lists.php.net to get a copy of this message | ||
How are you getting the template from the database ?
Can you tell us ?
So then is more easy to discover the problem
Cheers,
Ernani
"Peter J. Pieczora" <pjpieczora@sympatico.ca> escreveu na mensagem
news:200209230010.26870.pjpieczora@sympatico.ca...
> Hi,
>
> I'm trying to accomplish the following:
>
> $query1 = "SELECT * FROM cpc_course_details WHERE id='$id'";
> $result1 = mysql_query($query1);
> while ($data1 = mysql_fetch_array ($result1)) {
> $c_length .= $data1[c_length];
> }
> $smarty->assign("c_length", "$c_length");
>
> and in my .tpl file
>
> {section name=id}
> {$c_length}
> {/section}
>
> which works fine, but in case when I try to load same .tpl file from the
> database it doesn't. I mean page loads fine but variables are not being
> passed.
> I wonder what mistake do I make, and if there is a solution to this
problem.
>
> Cheers,
>
> Peter