RE: [PHP] Re: How can you determine if you on the last result?

From: Date: Wed, 28 Nov 2001 22:29:09 +0000
Subject: RE: [PHP] Re: How can you determine if you on the last result?
Groups: php.general 
Request: Send a blank email to php-general+get-75952@lists.php.net to get a copy of this message
I believe there's no row count function for oci, so could you change the logic to: while(OCIFetchInto ($curs, $data)) { // normal code here } if($isLastRecord) // do something ?? Martin -----Original Message----- From: Philip Hallstrom [mailto:philip@adhesivemedia.com] Sent: Thursday, November 29, 2001 9:28 AM To: J. Anderson Scarbrough Cc: php-general@lists.php.net Subject: [PHP] Re: How can you determine if you on the last result? You could use whatever OCI function returns the number of rows returned and then keep a counter or you could do it this way: while(OCIFetchInto ($curs, $data)) { # do normal stuff for *ALL* rows } # do some stuff with $data which now contains the last row. -philip On Wed, 28 Nov 2001, J. Anderson Scarbrough wrote: > If I execute a query and fill a resultset, how can i tell if I am on the > last result in the set? I want to something like: > > while(OCIFetchInto ($curs, $data)) { > > if($isLastRecord) > // do something > } > > Thanks. > > Anderson > > _________________________________________________________________ > Get your FREE download of MSN Explorer at }‡DsÜ@¥šõ¯ > `Ûhttp://explorer.msn.com/intl.asp > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#75952) next »