RE: [PEAR] Page 2.4.1 issue
| From: | Yeo Wee Tat | Date: | Thu, 08 Jun 2006 06:12:05 +0000 |
| Subject: | RE: [PEAR] Page 2.4.1 issue | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-24282@lists.php.net to get a copy of this message | ||
Hi Justin, Below is the code:
<?php
/**
*
*
* @version $Id$
* @copyright 2006
*/
require_once '../library/class.PearDB.php';
require_once '../library/Pager_Wrapper.php';
//$dsn = "mysql://datacraft:123456@10.0.0.162/datacraft";
//$_db = & DB::connect($dsn);
$db = new PearDB("mysql");
$db->connectDB();
$_db = $db->getDB();
$pagerOptions = array(
'mode' => 'Sliding',
'perPage' => 3,
);
$chassistbltemp_sql = "SELECT
serial_no,host_name,chasis_model,country,city,building,other FROM
tbl_chassis_temp";
$paged_data = Pager_Wrapper_DB($_db, $chassistbltemp_sql, $pagerOptions);
// $result = $paged_data['data']; //paged data
//$count = count($result);
while(list($name,$value) = each($result)){
echo "serial no:".$value[serial_no]."<br><br>";
}
?>
<html>
<head>
</head>
<body>
<form>
<table>
<tr align="middle" class="std1">
<td colspan="3" align="center">
<?php echo $paged_data['links']; ?>
</td>
</tr>
</table>
</form>
</body>
</html>
Yeo Wee Tat
Tel: +65-62730049 Fax: +65-62734934
Cxrus Solutions Pte Ltd (Singapore . Thailand)
1003 Bukit Merah Central #05-20 Singapore 159836
System Integration . Business Solutions . Linux Simplified
-----Original Message-----
From: Justin Patrin [mailto:papercrane@gmail.com]
Sent: Thursday, June 08, 2006 2:08 PM
To: weetat
Cc: pear-general@lists.php.net
Subject: Re: [PEAR] Page 2.4.1 issue
On 6/7/06, weetat <weetat.yeo@cxrus.com> wrote:
> Hi all ,
>
> Thanks all in this newsgroup for your help.
>
> I have question regarding PEAR Pager .
>
> The PEAR pager is working ok , however , the PEAR Pager always display
> "totalItems:" display and value "1" on my web page.
> How to make the "totalItems:" and the value "1" not to display on
> webpage?
>
> I am using MYSQL database and PHP 4.3.2
>
Huh? Where do these display? Perhaps you're outputting them yourself?
Give is some of your code so that we can try to help.
--
Justin Patrin
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.8.3/358 - Release Date: 6/7/2006