diff options
author | Stig Bakken <ssb@php.net> | 2001-03-24 07:00:44 +0000 |
---|---|---|
committer | Stig Bakken <ssb@php.net> | 2001-03-24 07:00:44 +0000 |
commit | 48aa99f6beeea8d77401637f8ac87484006180a3 (patch) | |
tree | f7bc4ae1f4ab6b117616b3a7f33074ce60551ecb /pear | |
parent | e6afd0a691b87cb4f584e91efab84d8cdfeefac2 (diff) | |
download | php-git-48aa99f6beeea8d77401637f8ac87484006180a3.tar.gz |
* added Christian Stocker's tableInfo() implementation
Diffstat (limited to 'pear')
-rw-r--r-- | pear/DB.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/pear/DB.php b/pear/DB.php index 06eee72fa3..7713fd9464 100644 --- a/pear/DB.php +++ b/pear/DB.php @@ -133,6 +133,17 @@ 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 * common to all parts of DB. @@ -626,6 +637,11 @@ class DB_result $this->result = false; return true; } + + function tableInfo($mode = null) + { + return $this->dbh->tableInfo($this->result, $mode); + } } ?> |