MDB2
[ class tree: MDB2 ] [ index: MDB2 ] [ all elements ]

Source for file ibase.php

Documentation is available at ibase.php

  1. <?php
  2. // +----------------------------------------------------------------------+
  3. // | PHP versions 4 and 5                                                 |
  4. // +----------------------------------------------------------------------+
  5. // | Copyright (c) 1998-2007 Manuel Lemos, Tomas V.V.Cox,                 |
  6. // | Stig. S. Bakken, Lukas Smith, Frank M. Kromann, Lorenzo Alberton     |
  7. // | All rights reserved.                                                 |
  8. // +----------------------------------------------------------------------+
  9. // | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB  |
  10. // | API as well as database abstraction for PHP applications.            |
  11. // | This LICENSE is in the BSD license style.                            |
  12. // |                                                                      |
  13. // | Redistribution and use in source and binary forms, with or without   |
  14. // | modification, are permitted provided that the following conditions   |
  15. // | are met:                                                             |
  16. // |                                                                      |
  17. // | Redistributions of source code must retain the above copyright       |
  18. // | notice, this list of conditions and the following disclaimer.        |
  19. // |                                                                      |
  20. // | Redistributions in binary form must reproduce the above copyright    |
  21. // | notice, this list of conditions and the following disclaimer in the  |
  22. // | documentation and/or other materials provided with the distribution. |
  23. // |                                                                      |
  24. // | Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken,    |
  25. // | Lukas Smith nor the names of his contributors may be used to endorse |
  26. // | or promote products derived from this software without specific prior|
  27. // | written permission.                                                  |
  28. // |                                                                      |
  29. // | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS  |
  30. // | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT    |
  31. // | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS    |
  32. // | FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE      |
  33. // | REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,          |
  34. // | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
  35. // | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS|
  36. // |  OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED  |
  37. // | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT          |
  38. // | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY|
  39. // | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE          |
  40. // | POSSIBILITY OF SUCH DAMAGE.                                          |
  41. // +----------------------------------------------------------------------+
  42. // | Author: Lorenzo Alberton <l.alberton@quipo.it>                       |
  43. // +----------------------------------------------------------------------+
  44. //
  45. // $Id: ibase.php,v 1.66 2007/03/04 23:40:51 quipo Exp $
  46. //
  47.  
  48. require_once 'MDB2/Driver/Reverse/Common.php';
  49.  
  50. /**
  51.  * MDB2 InterbaseBase driver for the reverse engineering module
  52.  *
  53.  * @package MDB2
  54.  * @category Database
  55.  * @author Lorenzo Alberton  <l.alberton@quipo.it>
  56.  */
  57. class MDB2_Driver_Reverse_ibase extends MDB2_Driver_Reverse_Common
  58. {
  59.     /**
  60.      * Array for converting constant values to text values
  61.      * @var    array 
  62.      * @access public
  63.      */
  64.     var $types = array(
  65.         7   => 'smallint',
  66.         8   => 'integer',
  67.         9   => 'quad',
  68.         10  => 'float',
  69.         11  => 'd_float',
  70.         12  => 'date',      //dialect 3 DATE
  71.         13  => 'time',
  72.         14  => 'char',
  73.         16  => 'int64',
  74.         27  => 'double',
  75.         35  => 'timestamp'//DATE in older versions
  76.         37  => 'varchar',
  77.         40  => 'cstring',
  78.         261 => 'blob',
  79.     );
  80.  
  81.     /**
  82.      * Array for converting constant values to text values
  83.      * @var    array 
  84.      * @access public
  85.      */
  86.     var $subtypes = array(
  87.         //char subtypes
  88.         14 => array(
  89.             0 => 'unspecified',
  90.             1 => 'fixed'//BINARY data
  91.         ),
  92.         //blob subtypes
  93.         261 => array(
  94.             0 => 'unspecified',
  95.             1 => 'text',
  96.             2 => 'BLR'//Binary Language Representation
  97.             3 => 'access control list',
  98.             4 => 'reserved for future use',
  99.             5 => 'encoded description of a table\'s current metadata',
  100.             6 => 'description of multi-database transaction that finished irregularly',
  101.         ),
  102.         //smallint subtypes
  103.         7 => array(
  104.             0 => 'RDB$FIELD_TYPE',
  105.             1 => 'numeric',
  106.             2 => 'decimal',
  107.         ),
  108.         //integer subtypes
  109.         8 => array(
  110.             0 => 'RDB$FIELD_TYPE',
  111.             1 => 'numeric',
  112.             2 => 'decimal',
  113.         ),
  114.         //int64 subtypes
  115.         16 => array(
  116.             0 => 'RDB$FIELD_TYPE',
  117.             1 => 'numeric',
  118.             2 => 'decimal',
  119.         ),
  120.     );
  121.  
  122.     // {{{ getTableFieldDefinition()
  123.  
  124.     /**
  125.      * Get the structure of a field into an array
  126.      *
  127.      * @param string    $table       name of table that should be used in method
  128.      * @param string    $field_name  name of field that should be used in method
  129.      * @return mixed data array on success, a MDB2 error on failure
  130.      * @access public
  131.      */
  132.     function getTableFieldDefinition($table$field_name)
  133.     {
  134.         $db =$this->getDBInstance();
  135.         if (PEAR::isError($db)) {
  136.             return $db;
  137.         }
  138.  
  139.         $result $db->loadModule('Datatype'nulltrue);
  140.         if (PEAR::isError($result)) {
  141.             return $result;
  142.         }
  143.         $table $db->quote(strtoupper($table)'text');
  144.         $field_name $db->quote(strtoupper($field_name)'text');
  145.         $query = "SELECT RDB\$RELATION_FIELDS.RDB\$FIELD_NAME AS name,
  146.                          RDB\$FIELDS.RDB\$FIELD_LENGTH AS \"length\",
  147.                          RDB\$FIELDS.RDB\$FIELD_TYPE AS field_type_code,
  148.                          RDB\$FIELDS.RDB\$FIELD_SUB_TYPE AS field_sub_type_code,
  149.                          RDB\$RELATION_FIELDS.RDB\$DESCRIPTION AS description,
  150.                          RDB\$RELATION_FIELDS.RDB\$NULL_FLAG AS null_flag,
  151.                          RDB\$FIELDS.RDB\$DEFAULT_SOURCE AS default_source
  152.                     FROM RDB\$FIELDS
  153.                LEFT JOIN RDB\$RELATION_FIELDS ON RDB\$FIELDS.RDB\$FIELD_NAME = RDB\$RELATION_FIELDS.RDB\$FIELD_SOURCE
  154.                    WHERE UPPER(RDB\$RELATION_FIELDS.RDB\$RELATION_NAME)=$table
  155.                      AND UPPER(RDB\$RELATION_FIELDS.RDB\$FIELD_NAME)=$field_name;";
  156.         $column $db->queryRow($querynullMDB2_FETCHMODE_ASSOC);
  157.         if (PEAR::isError($column)) {
  158.             return $column;
  159.         }
  160.         if (empty($column)) {
  161.             return $db->raiseError(MDB2_ERROR_NOT_FOUNDnullnull,
  162.                 'it was not specified an existing table column'__FUNCTION__);
  163.         }
  164.         $column array_change_key_case($columnCASE_LOWER);
  165.         if ($db->options['portability'MDB2_PORTABILITY_FIX_CASE{
  166.             if ($db->options['field_case'== CASE_LOWER{
  167.                 $column['name'strtolower($column['name']);
  168.             else {
  169.                 $column['name'strtoupper($column['name']);
  170.             }
  171.         }
  172.  
  173.         $column['type'array_key_exists((int)$column['field_type_code']$this->types)
  174.             ? $this->types[(int)$column['field_type_code']] 'undefined';
  175.         if ($column['field_sub_type_code']
  176.             && array_key_exists((int)$column['field_type_code']$this->subtypes)
  177.             && array_key_exists($column['field_sub_type_code']$this->subtypes[(int)$column['field_type_code']])
  178.         {
  179.             $column['field_sub_type'$this->subtypes[(int)$column['field_type_code']][$column['field_sub_type_code']];
  180.         else {
  181.             $column['field_sub_type'= null;
  182.         }
  183.         $mapped_datatype $db->datatype->mapNativeDatatype($column);
  184.         if (PEAR::IsError($mapped_datatype)) {
  185.             return $mapped_datatype;
  186.         }
  187.         list($types$length$unsigned$fixed$mapped_datatype;
  188.         $notnull !empty($column['null_flag']);
  189.         $default $column['default_source'];
  190.         if (is_null($default&& $notnull{
  191.             $default ($types[0== 'integer'? 0 : '';
  192.         }
  193.  
  194.         $definition[0= array('notnull' => $notnull'nativetype' => $column['type']);
  195.         if (!is_null($length)) {
  196.             $definition[0]['length'$length;
  197.         }
  198.         if (!is_null($unsigned)) {
  199.             $definition[0]['unsigned'$unsigned;
  200.         }
  201.         if (!is_null($fixed)) {
  202.             $definition[0]['fixed'$fixed;
  203.         }
  204.         if ($default !== false{
  205.             $definition[0]['default'$default;
  206.         }
  207.         foreach ($types as $key => $type{
  208.             $definition[$key$definition[0];
  209.             if ($type == 'clob' || $type == 'blob'{
  210.                 unset($definition[$key]['default']);
  211.             }
  212.             $definition[$key]['type'$type;
  213.             $definition[$key]['mdb2type'$type;
  214.         }
  215.         return $definition;
  216.     }
  217.  
  218.     // }}}
  219.     // {{{ getTableIndexDefinition()
  220.  
  221.     /**
  222.      * Get the structure of an index into an array
  223.      *
  224.      * @param string    $table      name of table that should be used in method
  225.      * @param string    $index_name name of index that should be used in method
  226.      * @return mixed data array on success, a MDB2 error on failure
  227.      * @access public
  228.      */
  229.     function getTableIndexDefinition($table$index_name$format_index_name = true)
  230.     {
  231.         $db =$this->getDBInstance();
  232.         if (PEAR::isError($db)) {
  233.             return $db;
  234.         }
  235.         $table $db->quote(strtoupper($table)'text');
  236.         $query = "SELECT RDB\$INDEX_SEGMENTS.RDB\$FIELD_NAME AS field_name,
  237.                          RDB\$INDICES.RDB\$UNIQUE_FLAG AS unique_flag,
  238.                          RDB\$INDICES.RDB\$FOREIGN_KEY AS foreign_key,
  239.                          RDB\$INDICES.RDB\$DESCRIPTION AS description
  240.                     FROM RDB\$INDEX_SEGMENTS
  241.                LEFT JOIN RDB\$INDICES ON RDB\$INDICES.RDB\$INDEX_NAME = RDB\$INDEX_SEGMENTS.RDB\$INDEX_NAME
  242.                LEFT JOIN RDB\$RELATION_CONSTRAINTS ON RDB\$RELATION_CONSTRAINTS.RDB\$INDEX_NAME = RDB\$INDEX_SEGMENTS.RDB\$INDEX_NAME
  243.                    WHERE UPPER(RDB\$INDICES.RDB\$RELATION_NAME)=$table
  244.                      AND UPPER(RDB\$INDICES.RDB\$INDEX_NAME)=%s
  245.                      AND RDB\$RELATION_CONSTRAINTS.RDB\$CONSTRAINT_TYPE IS NULL
  246.                 ORDER BY RDB\$INDEX_SEGMENTS.RDB\$FIELD_POSITION;";
  247.         $index_name_mdb2 $db->quote(strtoupper($db->getIndexName($index_name))'text');
  248.         $result $db->queryRow(sprintf($query$index_name_mdb2));
  249.         if (!PEAR::isError($result&& !is_null($result)) {
  250.             // apply 'idxname_format' only if the query succeeded, otherwise
  251.             // fallback to the given $index_name, without transformation
  252.             $index_name $index_name_mdb2;
  253.         else {
  254.             $index_name $db->quote(strtoupper($index_name)'text');
  255.         }
  256.         $result $db->query(sprintf($query$index_name));
  257.         if (PEAR::isError($result)) {
  258.             return $result;
  259.         }
  260.  
  261.         $index $row $result->fetchRow(MDB2_FETCHMODE_ASSOC);
  262.         if (empty($index)) {
  263.             return $db->raiseError(MDB2_ERROR_NOT_FOUNDnullnull,
  264.                 'it was not specified an existing table index'__FUNCTION__);
  265.         }
  266.  
  267.         $fields = array();
  268.         do {
  269.             $row array_change_key_case($rowCASE_LOWER);
  270.             $fields[$row['field_name'];
  271.         while (is_array($row $result->fetchRow(MDB2_FETCHMODE_ASSOC)));
  272.         $result->free();
  273.  
  274.         if ($db->options['portability'MDB2_PORTABILITY_FIX_CASE{
  275.             $fields array_map(($db->options['field_case'== CASE_LOWER ? 'strtolower' 'strtoupper')$fields);
  276.         }
  277.  
  278.         $definition = array();
  279.         foreach ($fields as $field{
  280.             $definition['fields'][$field= array();
  281.             // todo: collation?!?
  282.             /*
  283.             if (!empty($row['collation'])) {
  284.                 $definition['fields'][$field]['sorting'] = ($row['collation'] == 'A'
  285.                     ? 'ascending' : 'descending');
  286.             }
  287.             */
  288.         }
  289.         return $definition;
  290.     }
  291.  
  292.     // }}}
  293.     // {{{ getTableConstraintDefinition()
  294.  
  295.     /**
  296.      * Get the structure of a constraint into an array
  297.      *
  298.      * @param string    $table      name of table that should be used in method
  299.      * @param string    $index_name name of index that should be used in method
  300.      * @return mixed data array on success, a MDB2 error on failure
  301.      * @access public
  302.      */
  303.     function getTableConstraintDefinition($table$index_name)
  304.     {
  305.         $db =$this->getDBInstance();
  306.         if (PEAR::isError($db)) {
  307.             return $db;
  308.         }
  309.         
  310.         $table $db->quote(strtoupper($table)'text');
  311.         $query = "SELECT RDB\$INDEX_SEGMENTS.RDB\$FIELD_NAME AS field_name,
  312.                          RDB\$INDICES.RDB\$UNIQUE_FLAG AS unique_flag,
  313.                          RDB\$INDICES.RDB\$FOREIGN_KEY AS foreign_key,
  314.                          RDB\$INDICES.RDB\$DESCRIPTION AS description,
  315.                          RDB\$RELATION_CONSTRAINTS.RDB\$CONSTRAINT_TYPE AS constraint_type
  316.                     FROM RDB\$INDEX_SEGMENTS
  317.                LEFT JOIN RDB\$INDICES ON RDB\$INDICES.RDB\$INDEX_NAME = RDB\$INDEX_SEGMENTS.RDB\$INDEX_NAME
  318.                LEFT JOIN RDB\$RELATION_CONSTRAINTS ON RDB\$RELATION_CONSTRAINTS.RDB\$INDEX_NAME = RDB\$INDEX_SEGMENTS.RDB\$INDEX_NAME
  319.                    WHERE UPPER(RDB\$INDICES.RDB\$RELATION_NAME)=$table
  320.                      AND UPPER(RDB\$INDICES.RDB\$INDEX_NAME)=%s
  321.                 ORDER BY RDB\$INDEX_SEGMENTS.RDB\$FIELD_POSITION;";
  322.         $index_name_mdb2 $db->quote(strtoupper($db->getIndexName($index_name))'text');
  323.         $result $db->queryRow(sprintf($query$index_name_mdb2));
  324.         if (!PEAR::isError($result&& !is_null($result)) {
  325.             // apply 'idxname_format' only if the query succeeded, otherwise
  326.             // fallback to the given $index_name, without transformation
  327.             $index_name $index_name_mdb2;
  328.         else {
  329.             $index_name $db->quote(strtoupper($index_name)'text');
  330.         }
  331.         $result $db->query(sprintf($query$index_name));
  332.         if (PEAR::isError($result)) {
  333.             return $result;
  334.         }
  335.  
  336.         $index $row $result->fetchRow(MDB2_FETCHMODE_ASSOC);
  337.         if (empty($index)) {
  338.             return $db->raiseError(MDB2_ERROR_NOT_FOUNDnullnull,
  339.                 'it was not specified an existing table constraint'__FUNCTION__);
  340.         }
  341.         $fields = array();
  342.         do {
  343.             $row array_change_key_case($rowCASE_LOWER);
  344.             $fields[$row['field_name'];
  345.         while (is_array($row $result->fetchRow(MDB2_FETCHMODE_ASSOC)));
  346.         $result->free();
  347.  
  348.         if ($db->options['portability'MDB2_PORTABILITY_FIX_CASE{
  349.             $fields array_map(($db->options['field_case'== CASE_LOWER ? 'strtolower' 'strtoupper')$fields);
  350.         }
  351.  
  352.         $definition = array();
  353.         if ($index['constraint_type'== 'PRIMARY KEY'{
  354.             $definition['primary'= true;
  355.         elseif ($index['unique_flag']{
  356.             $definition['unique'= true;
  357.         elseif ($index['foreign_key']{
  358.             $definition['foreign'= true;
  359.         }
  360.         if (!$index['unique_flag'&& !$index['foreign_key']{
  361.             return $db->raiseError(MDB2_ERROR_NOT_FOUNDnullnull,
  362.                 'it was not specified an existing table constraint'__FUNCTION__);
  363.         }
  364.         foreach ($fields as $field{
  365.             $definition['fields'][$field= array();
  366.             //collation?!?
  367.             /*
  368.             if (!empty($row['collation'])) {
  369.                 $definition['fields'][$field]['sorting'] = ($row['collation'] == 'A'
  370.                     ? 'ascending' : 'descending');
  371.             }
  372.             */
  373.         }
  374.         return $definition;
  375.     }
  376.  
  377.     // }}}
  378.     // {{{ getTriggerDefinition()
  379.  
  380.     /**
  381.      * Get the structure of a trigger into an array
  382.      *
  383.      * EXPERIMENTAL
  384.      *
  385.      * WARNING: this function is experimental and may change the returned value
  386.      * at any time until labelled as non-experimental
  387.      *
  388.      * @param string    $trigger    name of trigger that should be used in method
  389.      * @return mixed data array on success, a MDB2 error on failure
  390.      * @access public
  391.      */
  392.     function getTriggerDefinition($trigger)
  393.     {
  394.         $db =$this->getDBInstance();
  395.         if (PEAR::isError($db)) {
  396.             return $db;
  397.         }
  398.  
  399.         $trigger $db->quote(strtoupper($trigger)'text');
  400.         $query = "SELECT RDB\$TRIGGER_NAME AS trigger_name,
  401.                          RDB\$RELATION_NAME AS table_name,
  402.                          RDB\$TRIGGER_SOURCE AS trigger_body,
  403.                          CASE RDB\$TRIGGER_TYPE
  404.                             WHEN 1 THEN 'BEFORE'
  405.                             WHEN 2 THEN 'AFTER'
  406.                             WHEN 3 THEN 'BEFORE'
  407.                             WHEN 4 THEN 'AFTER'
  408.                             WHEN 5 THEN 'BEFORE'
  409.                             WHEN 6 THEN 'AFTER'
  410.                          END AS trigger_type,
  411.                          CASE RDB\$TRIGGER_TYPE
  412.                             WHEN 1 THEN 'INSERT'
  413.                             WHEN 2 THEN 'INSERT'
  414.                             WHEN 3 THEN 'UPDATE'
  415.                             WHEN 4 THEN 'UPDATE'
  416.                             WHEN 5 THEN 'DELETE'
  417.                             WHEN 6 THEN 'DELETE'
  418.                          END AS trigger_event,
  419.                          CASE RDB\$TRIGGER_INACTIVE
  420.                             WHEN 1 THEN 0 ELSE 1
  421.                          END AS trigger_enabled,
  422.                          RDB\$DESCRIPTION AS trigger_comment
  423.                     FROM RDB\$TRIGGERS
  424.                    WHERE UPPER(RDB\$TRIGGER_NAME)=$trigger";
  425.         $types = array(
  426.             'trigger_name'    => 'text',
  427.             'table_name'      => 'text',
  428.             'trigger_body'    => 'clob',
  429.             'trigger_type'    => 'text',
  430.             'trigger_event'   => 'text',
  431.             'trigger_comment' => 'text',
  432.             'trigger_enabled' => 'boolean',
  433.         );
  434.  
  435.         $def $db->queryRow($query$typesMDB2_FETCHMODE_ASSOC);
  436.         if (PEAR::isError($def)) {
  437.             return $def;
  438.         }
  439.  
  440.         $clob $def['trigger_body'];
  441.         if (!PEAR::isError($clob&& is_resource($clob)) {
  442.             $value '';
  443.             while (!feof($clob)) {
  444.                 $data fread($clob8192);
  445.                 $value.= $data;
  446.             }
  447.             $db->datatype->destroyLOB($clob);
  448.             $def['trigger_body'$value;
  449.         }
  450.  
  451.         return $def;
  452.     }
  453.  
  454.     // }}}
  455.     // {{{ tableInfo()
  456.  
  457.     /**
  458.      * Returns information about a table or a result set
  459.      *
  460.      * NOTE: only supports 'table' and 'flags' if <var>$result</var>
  461.      * is a table name.
  462.      *
  463.      * @param object|string $result  MDB2_result object from a query or a
  464.      *                                  string containing the name of a table.
  465.      *                                  While this also accepts a query result
  466.      *                                  resource identifier, this behavior is
  467.      *                                  deprecated.
  468.      * @param int            $mode    a valid tableInfo mode
  469.      *
  470.      * @return array  an associative array with the information requested.
  471.      *                  A MDB2_Error object on failure.
  472.      *
  473.      * @see MDB2_Driver_Common::tableInfo()
  474.      */
  475.     function tableInfo($result$mode = null)
  476.     {
  477.         if (is_string($result)) {
  478.            return parent::tableInfo($result$mode);
  479.         }
  480.  
  481.         $db =$this->getDBInstance();
  482.         if (PEAR::isError($db)) {
  483.             return $db;
  484.         }
  485.  
  486.         $resource = MDB2::isResultCommon($result$result->getResource($result;
  487.         if (!is_resource($resource)) {
  488.             return $db->raiseError(MDB2_ERROR_NEED_MORE_DATAnullnull,
  489.                 'Could not generate result resource'__FUNCTION__);
  490.         }
  491.  
  492.         if ($db->options['portability'MDB2_PORTABILITY_FIX_CASE{
  493.             if ($db->options['field_case'== CASE_LOWER{
  494.                 $case_func 'strtolower';
  495.             else {
  496.                 $case_func 'strtoupper';
  497.             }
  498.         else {
  499.             $case_func 'strval';
  500.         }
  501.  
  502.         $count @ibase_num_fields($resource);
  503.         $res   = array();
  504.  
  505.         if ($mode{
  506.             $res['num_fields'$count;
  507.         }
  508.  
  509.         $db->loadModule('Datatype'nulltrue);
  510.         for ($i = 0; $i $count$i++{
  511.             $info @ibase_field_info($resource$i);
  512.             if (($pos strpos($info['type']'(')) !== false{
  513.                 $info['type'substr($info['type']0$pos);
  514.             }
  515.             $res[$i= array(
  516.                 'table'  => $case_func($info['relation']),
  517.                 'name'   => $case_func($info['name']),
  518.                 'type'   => $info['type'],
  519.                 'length' => $info['length'],
  520.                 'flags'  => '',
  521.             );
  522.             $mdb2type_info $db->datatype->mapNativeDatatype($res[$i]);
  523.             if (PEAR::isError($mdb2type_info)) {
  524.                return $mdb2type_info;
  525.             }
  526.             $res[$i]['mdb2type'$mdb2type_info[0][0];
  527.             if ($mode MDB2_TABLEINFO_ORDER{
  528.                 $res['order'][$res[$i]['name']] $i;
  529.             }
  530.             if ($mode MDB2_TABLEINFO_ORDERTABLE{
  531.                 $res['ordertable'][$res[$i]['table']][$res[$i]['name']] $i;
  532.             }
  533.         }
  534.  
  535.         return $res;
  536.     }
  537. }
  538. ?>

Documentation generated on Mon, 11 Mar 2019 14:57:24 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.