]> granicus.if.org Git - php/commitdiff
* added Christian Stocker's tableInfo() implementation
authorStig Bakken <ssb@php.net>
Sat, 24 Mar 2001 07:00:44 +0000 (07:00 +0000)
committerStig Bakken <ssb@php.net>
Sat, 24 Mar 2001 07:00:44 +0000 (07:00 +0000)
pear/DB.php

index 06eee72fa395104442ddc78d2773a7679ecbca43..7713fd9464507a27ac8954f57f28d18e566a43fc 100644 (file)
@@ -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);
+    }
 }
 
 ?>