note 79471 deleted from control-structures.do.while by tularis

From: Date: Thu, 29 Nov 2007 09:09:10 +0000
Subject: note 79471 deleted from control-structures.do.while by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-132652@lists.php.net to get a copy of this message
Note Submitter: jantsch at gmail dot com ---- Useful when you want to continue to read a recordset that was already being read like in: <? $sql = "select * from customers"; $res = mysql_query( $sql ); // read the first record if( $rs = mysql_fetch_row( $res ) ){ // do something with this record } // do another stuff here // keep reading till the end if( mysql_num_rows( $res )>1 ){ do{ // processing the records till the end }while( $rs = mysql_fetch_row( $res )); } ?>

« previous php.notes (#132652) next »