Re: DB.php phpInfo() suggestion and questions

From: Date: Thu, 16 Aug 2001 00:16:04 +0000
Subject: Re: DB.php phpInfo() suggestion and questions
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-1521@lists.php.net to get a copy of this message
"Yermo M. Lamers" wrote: > > Suggestion: > > It would make auto-generating SQL queries much easier of there were an > "isString" field available in the tableInfo in addition to the "type" > field. > then you could know immediately whether a value needs to be quoted and > escaped when generating a query. It's a good idea. Perhaps having a SQL data type to PHP data type conversor could be better even. > Who can I send patches to and what's the likelihood that such patches > would make it into PEAR? Here :) > Question: > > In DB/mysql.php I note that you can pass the name of a table to > tableInfo(). > Code that I'm writing makes use of that and I wanted to make sure that > behavior > was going to stay in the library. (i.e. that it's "official" behavior). For the moment I don't see why not. JFYI there are two way of calling tableInfo: $db->tableInfo('table'); // info from a table or $res = $db->query('select ...'); $res->tableInfo(); // info from a result set > Question: > > Will all the tableInfo() fields be supported on all platforms? > You mean all databases no? Umm.. that's difficult to ensure. The mysql support is impressive in this area, in other backends things are more complicated (pgsql is an example or obdc and others may be also). With the data returned by tableInfo one could build very complex things but again a good support for many of the backends will be a great effort. Tomas V.V.Cox

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