Re: PEAR DB - some suggested improvements

From: Date: Sun, 28 Oct 2001 09:20:57 +0000
Subject: Re: PEAR DB - some suggested improvements
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-2424@lists.php.net to get a copy of this message
Hi Tomas, Tomas V.V.Cox <cox@idecnet.com> wrote in message news:3BDB3FDA.9738C273@idecnet.com... > John Lim wrote: > > > > Hello, > > > > While reviewing PEAR DB for a book I'm writing, > > Oh yes? nice, please advice us when it get published :-) > Sometime next year. Am working with Andrei Z. and a few other writers. > > In Pear DB we offer two kind of error messages, both accesible from the > Pear Error object: My mistake - i misread some of the implementation details in the source code. Of course you are right. > > 2. The oci8 driver attempts to return the numRows() by > > changing the select statement to a select count(*). This > > will only work in a single-user or read-only environment. > > Better to accept defeat and just return -1. > > This is not the default behavoir of the driver and by default it will > return a "not capable" error message. But if you really needed it you > can use it any way. What's the problem of the count() stuff? > The count() stuff is not reliable, and is misleading. Eg. you SELECT count(*) FROM messages then 2 users post new messages before you retrieve the messages. Your count(*) will be wrong. Of course the PEAR DB programmer has to enable portability on, so perhaps that is his problem... Bye, John

« previous php.pear.dev (#2424) next »