how to use Pager on an sql (Page pagination)

From: Date: Mon, 12 Jul 2004 05:00:41 +0000
Subject: how to use Pager on an sql (Page pagination)
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-13646@lists.php.net to get a copy of this message
Im new on PHP Pear, and im trying the Pager. I found some non-working articles on the internet, and most of them are outdated already. It wont work. I was hoping, you guys here at PEAR mailing list could help me get this result via PEAR Pager (Page pagination) The simple structure, i have done below is it will try to query most of the details on one of my table. And all of that is displaying when i view it on my browser. ## some codes ## <?php ..... // issue the query $sql = "select ts, tsapp, ip, name, email, location, website, message from gbook order by ts desc"; $q = $db->query($sql); if (DB::iserror($q)) { die($q->getMessage()); } // generate the table while ($q->fetchInto($row)) { ?> <table width="407" cellpadding="0" cellspacing="4" border="0" class="textContent"> <tr> <td><font size="2"><b><?= $row[3] ?></b></font> (<?= $row[4] ?>), <a href="http://www.dnsstuff.com/tools/whois.ch?ip=<?= $row[2] ?>" target="_blank"><?= $row[2] ?></a></td> </tr> <tr> <td>timestamp: <?= $row[1] ?></td> </tr> <tr> <td>location: <a href="http://www.google.com/search?hl=en&ie=UTF-8&q=<?= $row[5] ?>" target="_blank"><?= $row[5] ?></a></td> </tr> <tr> <td>website: <a href="<?= $row[6] ?>" target="_blank"><?= $row[6] ?></a></td> </tr> <tr> <td height="30" valign="top" align="left"><br><?= $row[7] ?></td> </tr> </table> <?php } ?> ## some codes ## -- Louie Miranda http://www.axishift.com

« previous php.pear.general (#13646) next »