Re: fetchAll() for DB classes

From: Date: Wed, 28 Nov 2001 00:18:41 +0000
Subject: Re: fetchAll() for DB classes
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-3140@lists.php.net to get a copy of this message
"André Næss" wrote: > > "Richard Heyes" <richard@phpguru.org> wrote in message > news:NEBBIDEMHHJJCANAAAKFMEKDJOAA.richard@phpguru.org... > > > Maybe I'm missing something obvious, but how is that different from the > > > existing getAll() ? > > > > It's not. I missed that one. > > Actually, one thing I frequently do when working with resultsets is the same > as fetchAll() but with a specified key, typically an id field. So would it > be possible to have a fetchAll($keyfield) function? Of course, the user > would be responsible for the uniqueness of the key field... An example: > Take a look at the getAssoc() method. FYI: there is also getOne(), getRow(), getCol(), apart from the mentioned getAssoc() and getAll(). Tomas V.V.Cox

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