Re: Another PDO ?

From: Date: Mon, 10 Sep 2012 14:57:43 +0000
Subject: Re: Another PDO ?
References: 1 2 3 4  Groups: php.db 
Request: Send a blank email to php-db+get-48478@lists.php.net to get a copy of this message
Imagine if you are building a generic database framework, so you (dont have, but) can generalize your queries functions and abstract some tables info. 2012/9/10 Graham H. <menello@gmail.com> > I think it's so that you could write functions as generically as possible. > So you don't have to pass in the number of columns or hard code in values > for number of columns, you can dynamically check the column count for each > result set that gets passed in. That's my guess. > > On Mon, Sep 10, 2012 at 8:51 AM, Jim Giner <jim.giner@albanyhandball.com > >wrote: > > > On 9/10/2012 10:49 AM, Bastien Koert wrote: > > > >> On Mon, Sep 10, 2012 at 9:48 AM, Jim Giner < > jim.giner@albanyhandball.com> > >> wrote: > >> > >>> Reading up on the pdostatement class. Wondering what the intent of the > >>> columnCount function is. I mean, aren't the number of columns in a > >>> result > >>> known when you write the query? Granted, you might have some very > >>> complex > >>> query that you may not know the number, but for most queries you will > >>> know > >>> the columns you are expecting. So - what am I not seeing? > >>> > >>> -- > >>> PHP Database Mailing List (http://www.php.net/) > >>> To unsubscribe, visit: > >>> http://www.php.net/unsub.php > >>> > >>> > >> It might be for those cases where you run a select * from ... > >> > >> But - again - one already knows how many fields are in that table when > > one writes the query... > > > > > > -- > > PHP Database Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > -- > Graham Holtslander > Computer Systems Technologist > www.graham.holtslander.com > menello@gmail.com >

« previous php.db (#48478) next »