Re: [DB] returning typed data when fetching rows

From: Date: Fri, 06 Aug 2004 13:39:09 +0000
Subject: Re: [DB] returning typed data when fetching rows
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-32479@lists.php.net to get a copy of this message
News.Php.Net wrote:
First, I don't seem to find in either MDB or MDB2 an automated way of fetching typed data (you have to manually pass an array of types).
Well those types need to be discovered somewhere. Doing it manually is the sensible thing to do. Fetching it automatically works well on mysql and is partly implemented in sqlite and pgsql.
Well, in my implementation, I always call a method that retrieves information about a table before doing any query (that call is made by the query methods themselves). The method retrieves the info only once and caches it: subsequent calls for the same table will simply return the info already available. It pretty simple, and I can't see why it wouldn't be desirable. [snip]
So unfortunately you are not missing anything .. but MDB2 seems like the best place to me to start adding stuff like that, especially since its faster and the API was designed to handle these kinds of tasks.
So why did you first reply to me as if I had posted my question too quickly, without taking the time to check whether it wasn't already supported elsewhere? *sigh* That said, your suggestion is duly noted.
regards,
Likewise. Guillaume

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