From: Stig Bakken Date: Sat, 24 Mar 2001 07:00:44 +0000 (+0000) Subject: * added Christian Stocker's tableInfo() implementation X-Git-Tag: php-4.0.6RC1~579 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=48aa99f6beeea8d77401637f8ac87484006180a3;p=php * added Christian Stocker's tableInfo() implementation --- diff --git a/pear/DB.php b/pear/DB.php index 06eee72fa3..7713fd9464 100644 --- a/pear/DB.php +++ b/pear/DB.php @@ -132,6 +132,17 @@ define('DB_GETMODE_ORDERED', DB_FETCHMODE_ORDERED); define('DB_GETMODE_ASSOC', DB_FETCHMODE_ASSOC); define('DB_GETMODE_FLIPPED', DB_FETCHMODE_FLIPPED); +/** + * these are constants for the tableInfo-function + * they are bitwised or'ed. so if there are more constants to be defined + * in the future, adjust DB_TABLEINFO_FULL accordingly + */ + +define('DB_TABLEINFO_ORDER', 1); +define('DB_TABLEINFO_ORDERTABLE', 2); +define('DB_TABLEINFO_FULL', 3); + + /** * The main "DB" class is simply a container class with some static * methods for creating DB objects as well as some utility functions @@ -626,6 +637,11 @@ class DB_result $this->result = false; return true; } + + function tableInfo($mode = null) + { + return $this->dbh->tableInfo($this->result, $mode); + } } ?>