RE: [PHP-DB] Re: Alternating rows pulled from database
| From: | MrBaseball34 | Date: | Thu, 29 Nov 2001 21:08:57 +0000 |
| Subject: | RE: [PHP-DB] Re: Alternating rows pulled from database | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-14704@lists.php.net to get a copy of this message | ||
In article <C9C89C32CE51D311BD770008C79FCFF301EC6390@alex.legion.org>,
tnally@legion.org says...
> Not knowing what else is going on here... at the
> very least your row counting variable is inconsistent.
>
> You mention row_count (in the modulus test) and rowcount
> (in the initialization and incrementation).
>
Typo...
$rowcount = 0
while($forum = $db->fetch_array($query)) {
$forumlist .= ($rowcount % 2) ?
forum($forum, "index_forum") :
forum($forum, "index_forum2");
$rowcount++;
}