Re: PDO question: any way to resolve duplicate column names with PDO_FETCH_ASSOC?

From: Date: Mon, 13 Jun 2005 21:29:36 +0000
Subject: Re: PDO question: any way to resolve duplicate column names with PDO_FETCH_ASSOC?
References: 1 2 3  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-2469@lists.php.net to get a copy of this message
Hi Matthew, > What you propose when the underlying library supports returning table > names - adding an attribute on the prepare - would be fine. I wondered why > you wouldn't want to put it on the fetch, like PDO_FETCH_ASSOC_QUALIFIED, > but maybe it's extra work to collect the information in the first place? Yes > names of the tables and columns. I would need to know that the values in the > arrays were in some guaranteed order i.e. that you had copied them from the > result in a certain order, so that at least I knew id[0] appeared before > id[1] in the SQL statement. This should always be the case, as PDO will walk the columns left-to-right. Would you mind opening up a bug report for this issue? Although I do flag mail for follow up, it tends to be mostly minor stuff, so will likely forget to check back on this; the bug report will group it together with other PDO stuff so that I see it when I'm next looking. Thanks! --Wez.

« previous php.pecl.dev (#2469) next »