[DB] Suggestion for field types
| From: | Peter | Date: | Thu, 08 Jan 2004 10:58:43 +0000 |
| Subject: | [DB] Suggestion for field types | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-24891@lists.php.net to get a copy of this message | ||
Hi all. Is there a mechanism in pear DB to ask about the generic field type? Eg. the following
would be useful:
... $i = ... column number of result
if ($result->isNumber($i)) ... code to right justify result
if ($result->isChar($i)) ... code to quote/do case conversion etc.
...
This would avoid having to worry about strange types like bpchar, SQLSMINT, int2. My feeling is the
native types should in fact be entirely invisible via PEAR - that's what the native API's
are for.
But perhaps I'm missing something thats already there?
Any comments welcome,
Peter