Re: PEAR::Page issue (with Smarty)
| From: | Lorenzo Alberton | Date: | Sun, 13 Feb 2005 08:29:29 +0000 |
| Subject: | Re: PEAR::Page issue (with Smarty) | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-17512@lists.php.net to get a copy of this message | ||
Hi Robert,
Robert wrote:
I am getting two blank rows on the last page of my selection. The same query using Perl works fine. A secondary issue is that no matter what I put in the "per page" I get 6 lines. I am using Oracle (9.2.0.2) and that might be an issue (though I am not sure). I am new to PHP (trying to move my stuff from Perl).[snip]
{section name=item loop=$pageData}
<tr class="{cycle values="trcol1,trcol2"}">
<td>{$pageData.data[item].SURNAME}</td>
I believe you should write
{section name=item loop=$pageData.data}
<tr class="{cycle values="trcol1,trcol2"}">
<td>{$pageData.data[item].SURNAME}</td>
instead, but I don't know the {section} tag very well.
The same thing, using {foreach}, would be:
{foreach item=item from=$pageData.data name=me} <tr class="{if $smarty.foreach.me.iteration % 2}trcol1{else}trcol2{/if}">
<td>{$item.SURNAME}</td>
HTH
Regards,
--
Lorenzo Alberton
http://pear.php.net/user/quipo