Re: $db->tableInfo(); (PEAR::DB)
| From: | Tomas V.V.Cox | Date: | Thu, 13 Sep 2001 20:21:15 +0000 |
| Subject: | Re: $db->tableInfo(); (PEAR::DB) | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-1905@lists.php.net to get a copy of this message | ||
Joao Prado Maia wrote:
>
> On 13 Sep 2001, Marc Logemann wrote:
>
> >
> > I have questions regarding tableinfo() method, it gives
> > back an multi-dim. assoc array with fieldinformations, so far so good.
> > One entry in this array is [flags].
> >
[..]
> >
> > If this should be the case, wouldnt it be useful to abstract
> > also this kind of data/flags, because i dont want to make the abstraction
> > in my application of course.
> >
[..]
>
> The mysql version of tableInfo() currently uses mysql_list_fields() and
> mysql_*fields* functions. The problem here is that a BLOB column for
> instance is the same as a TEXT column, but the difference is inside the
> 'flags' index, which contains 'binary' on those cases. It would be nice to
> abstract that to the actual datatypes of the fields.
>
IMHO the tableinfo methods are perhaps the most difficult things to get
and abstract. And yes it could be nice if we could abstract flags, types
and lengths (for ex. postgres returns -1 in a text field type that means
1Gb if I'm not wrong).
Please go ahead with your suggestions :-)
Tomas V.V.Cox