DB Informix
| From: | Peter | Date: | Tue, 06 Jan 2004 18:52:27 +0000 |
| Subject: | DB Informix | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-10001@lists.php.net to get a copy of this message | ||
Hi I have have been trying to test a PHP cross db browser using Informix. For this I need getListOf
to work.
The Informix implementation of DB doesn't offer much metadata, but here is a small patch
someone may find handy.
The Pear code in ifx.php contained the following: ($Id: ifx.php,v 1.14 2003/08/28 12:20:32 cox Exp
$)
387 function getSpecialQuery($type)
388 {
389 switch ($type) {
390 case 'tables':
392 default:
Changing it to this:
390 case 'tables':
391 return 'select tabname from systables where tabid >= 100';
makes the getListOf call work for 'tables'. Any tips to get it to fetch a list of DBs as
well would be welcome :)
Peter
PS: I was hoping to also look at making tableInfo work. This seems to involve adding a taleInfo
function to ifx.php, copying from say pgsql.php, and changing calls such as pg_num_fields to
ifx_num_fields... but perhaps its more complex than that...