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:[EMAIL PROTECTED]]
Sent: Thursday, November 29, 2001 9:28 AM
To: J. Anderson Scarbrough
Cc: [EMAIL PROTECTED]
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 http://explorer.msn.com/intl.asp
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to