Move Previous record in php.
Posted: Tue Dec 28, 2010 12:38 am
Hello,
I'm fetching the data from db
I'm fetching the data from db
Code: Select all
, I want to moveprevious record. how can i make it in php.
ex,
[syntax=php]$qry =" SELECT ci.info_dt, ci.iType FROM tbl_get_info AS ci";
$this->res = $this->query($qry);
if ( $this->getCount() > 0 ) {
$cnt1 = 0;
while($read_data = ($this->fetchonce($this->res))) {
$site_cd = $read_data['iType'];
$info_date= $read_data['info_dt'];
if ( ($cnt1 > 0 and $bak_info_date <> $info_date ) or ($cnt1+1) == $record_count ) {
//here i want to use moveprevious record.
// some code
}
}
$cnt1++;
bak_info_date = $read_data['info_dt'];
}
[/syntax]
Thanks in advance,
Thenndral