Re: [PHP-DB] Another PDO ?

2012-09-10 Thread Matt Pelmear
Jim, We have code that operates on tables that can be altered by users of the application (effectively storing different types of user data for each client). Some routines fetch results with PDO::FETCH_NUM as opposed to PDO::FETCH_ASSOC (or others), particularly when returning large amounts o

Re: [PHP-DB] Another PDO ?

2012-09-10 Thread Toby Hart Dyke
On 9/10/2012 4:54 PM, Jim Giner wrote: On 9/10/2012 11:10 AM, Lester Caine wrote: Jim Giner wrote: On 9/10/2012 10:49 AM, Bastien Koert wrote: On Mon, Sep 10, 2012 at 9:48 AM, Jim Giner wrote: Reading up on the pdostatement class. Wondering what the intent of the columnCount function is.

Re: [PHP-DB] Another PDO ?

2012-09-10 Thread Jim Giner
On 9/10/2012 11:10 AM, Lester Caine wrote: Jim Giner wrote: On 9/10/2012 10:49 AM, Bastien Koert wrote: On Mon, Sep 10, 2012 at 9:48 AM, Jim Giner 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

Re: [PHP-DB] Another PDO ?

2012-09-10 Thread Lester Caine
Jim Giner wrote: On 9/10/2012 10:49 AM, Bastien Koert wrote: On Mon, Sep 10, 2012 at 9:48 AM, Jim Giner 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? Gra

Re: [PHP-DB] Another PDO ?

2012-09-10 Thread Bruno Sandivilli
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. > 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 co

Re: [PHP-DB] Another PDO ?

2012-09-10 Thread Jim Giner
On 9/10/2012 10:53 AM, Graham H. wrote: 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. T

Re: [PHP-DB] Another PDO ?

2012-09-10 Thread Graham H.
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

Re: [PHP-DB] Another PDO ?

2012-09-10 Thread Jim Giner
On 9/10/2012 10:49 AM, Bastien Koert wrote: On Mon, Sep 10, 2012 at 9:48 AM, Jim Giner 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 ha

Re: [PHP-DB] Another PDO ?

2012-09-10 Thread Bastien Koert
On Mon, Sep 10, 2012 at 9:48 AM, Jim Giner 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

[PHP-DB] Another PDO ?

2012-09-10 Thread Jim Giner
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 kno