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

Loop Section com Resultado Incorreto

 
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 -> Language: Portuguese
View previous topic :: View next topic  
Author Message
josuec
Smarty n00b


Joined: 31 Jul 2008
Posts: 3

PostPosted: Thu Jul 31, 2008 8:36 pm    Post subject: Loop Section com Resultado Incorreto Reply with quote

Olá a todos.
Sou iniciante (noob) em smarty e estou com um problema com SECTION, segue o codigo:

{section name=ult loop=$ultimas}
<table width="249" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="278" height="35"><img src="img/marcador.jpg" width="10" height="8" /><a href="#" class="link-noticia">
{$ultimas.not_titulo[ult]}</a></td>
</tr>
<tr>
<td height="12"><img src="img/lay2 _r11_c9.jpg" width="249" height="4" /></td>
</tr>
</table>
{/section}

Pois bem, ao inves de me retornar 4 registro, que é o que tem na base de dados, me retornar 17 linhas.
alguém pode me ajudar a compreender isso?
Back to top
View user's profile Send private message
josuec
Smarty n00b


Joined: 31 Jul 2008
Posts: 3

PostPosted: Thu Jul 31, 2008 9:36 pm    Post subject: Achei o problema Reply with quote

Bem, nem sem como descobrir, mais descobrir

O problema está na descricação do loop, exemplo:

Antes {section name=i loop=$ultimas}

Depois {section name=i loop=$ultimas.not_cod}

Como pode obeservar, foi colocado o nome do primeiro campo na especificação do loop.

Grato!
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 -> Language: Portuguese 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