PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
, 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
Last edited by Benjamin on Tue Dec 28, 2010 3:56 am, edited 1 time in total.
Reason:Added [syntax=php] tags.
first i could not understand where to move your record...next thing $cnt1++ increment doesn't seem to work...even though you increment..when it goes to the loop again $cnt1 is initialized to 0 again..