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

Source for file fbsql.php

Documentation is available at fbsql.php

  1. <?php
  2. // +----------------------------------------------------------------------+
  3. // | PHP Version 4                                                        |
  4. // +----------------------------------------------------------------------+
  5. // | Copyright (c) 1998-2004 Manuel Lemos, Tomas V.V.Cox,                 |
  6. // | Stig. S. Bakken, Lukas Smith, Frank M. Kromann                       |
  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: Lukas Smith <smith@backendmedia.com>                         |
  43. // +----------------------------------------------------------------------+
  44. //
  45. // $Id: fbsql.php,v 1.6 2004/04/09 10:41:21 lsmith Exp $
  46. //
  47.  
  48. require_once 'MDB2/Driver/Manager/Common.php';
  49.  
  50. /**
  51.  * MDB2 FrontBase driver for the management modules
  52.  *
  53.  * @package MDB2
  54.  * @category Database
  55.  * @author  Frank M. Kromann <frank@kromann.info>
  56.  */
  57. {
  58.     // }}}
  59.     // {{{ constructor
  60.  
  61.     /**
  62.      * Constructor
  63.      */
  64.     function MDB2_Driver_Manager_fbsql($db_index)
  65.     {
  66.         $this->MDB2_Driver_Manager_Common($db_index);
  67.     }
  68.  
  69.     // }}}
  70.     // {{{ createDatabase()
  71.  
  72.     /**
  73.      * create a new database
  74.      *
  75.      * @param string $name name of the database that should be created
  76.      * @return mixed MDB2_OK on success, a MDB2 error on failure
  77.      * @access public
  78.      */
  79.     function createDatabase($name)
  80.     {
  81.         $db =$GLOBALS['_MDB2_databases'][$this->db_index];
  82.         if (MDB2::isError($result $db->connect())) {
  83.             return $result;
  84.         }
  85.         if (!@fbsql_create_db($name$db->connection)) {
  86.             return $db->raiseError();
  87.         }
  88.  
  89.         return MDB2_OK;
  90.     }
  91.  
  92.     // }}}
  93.     // {{{ dropDatabase()
  94.  
  95.     /**
  96.      * drop an existing database
  97.      *
  98.      * @param string $name name of the database that should be dropped
  99.      * @return mixed MDB2_OK on success, a MDB2 error on failure
  100.      * @access public
  101.      */
  102.     function dropDatabase($name)
  103.     {
  104.         $db =$GLOBALS['_MDB2_databases'][$this->db_index];
  105.         if (MDB2::isError($result $db->connect())) {
  106.             return $result;
  107.         }
  108.         if (!@fbsql_stop_db($name$db->connection)) {
  109.             return $db->raiseError();
  110.         }
  111.         if (!@fbsql_drop_db($name$db->connection)) {
  112.             return $db->raiseError();
  113.         }
  114.         return $db->disconnect();
  115.     }
  116.  
  117.     // }}}
  118.     // {{{ createTable()
  119.  
  120.     /**
  121.      * create a new table
  122.      *
  123.      * @param string $name     Name of the database that should be created
  124.      * @param array $fields Associative array that contains the definition of each field of the new table
  125.      *                         The indexes of the array entries are the names of the fields of the table an
  126.      *                         the array entry values are associative arrays like those that are meant to be
  127.      *                          passed with the field definitions to get[Type]Declaration() functions.
  128.      *
  129.      *                         Example
  130.      *                         array(
  131.      *
  132.      *                             'id' => array(
  133.      *                                 'type' => 'integer',
  134.      *                                 'unsigned' => 1
  135.      *                                 'notnull' => 1
  136.      *                                 'default' => 0
  137.      *                             ),
  138.      *                             'name' => array(
  139.      *                                 'type' => 'text',
  140.      *                                 'length' => 12
  141.      *                             ),
  142.      *                             'password' => array(
  143.      *                                 'type' => 'text',
  144.      *                                 'length' => 12
  145.      *                             )
  146.      *                         );
  147.      * @return mixed MDB2_OK on success, a MDB2 error on failure
  148.      * @access public
  149.      */
  150.     function createTable($name$fields)
  151.     {
  152.         $db =$GLOBALS['_MDB2_databases'][$this->db_index];
  153.         if (!isset($name|| !strcmp($name'')) {
  154.             return $db->raiseError(MDB2_ERROR_CANNOT_CREATEnullnull,
  155.                 'createTable: no valid table name specified');
  156.         }
  157.         if (count($fields== 0{
  158.             return $db->raiseError(MDB2_ERROR_CANNOT_CREATEnullnull,
  159.                 'createTable: no fields specified for table "'.$name.'"');
  160.         }
  161.         if (MDB2::isError($query_fields $this->getFieldDeclarationList($fields))) {
  162.             return $db->raiseError(MDB2_ERROR_CANNOT_CREATEnullnull,
  163.                 'createTable: unkown error');
  164.         }
  165.         $query = "CREATE TABLE $name ($query_fields)";
  166.  
  167.         return $db->query($query);
  168.     }
  169.  
  170.     // }}}
  171.     // {{{ dropTable()
  172.  
  173.     /**
  174.      * drop an existing table
  175.      *
  176.      * @param object    $dbs        database object that is extended by this class
  177.      * @param string $name name of the table that should be dropped
  178.      * @return mixed MDB2_OK on success, a MDB2 error on failure
  179.      * @access public
  180.      */
  181.     function dropTable(&$db$name)
  182.     {
  183.         return $db->query("DROP TABLE $name CASCADE");
  184.     }
  185.  
  186.     // }}}
  187.     // {{{ alterTable()
  188.  
  189.     /**
  190.      * alter an existing table
  191.      *
  192.      * @param string $name         name of the table that is intended to be changed.
  193.      * @param array $changes     associative array that contains the details of each type
  194.      *                              of change that is intended to be performed. The types of
  195.      *                              changes that are currently supported are defined as follows:
  196.      *
  197.      *                              name
  198.      *
  199.      *                                 New name for the table.
  200.      *
  201.      *                             added_fields
  202.      *
  203.      *                                 Associative array with the names of fields to be added as
  204.      *                                  indexes of the array. The value of each entry of the array
  205.      *                                  should be set to another associative array with the properties
  206.      *                                  of the fields to be added. The properties of the fields should
  207.      *                                  be the same as defined by the Metabase parser.
  208.      *
  209.      *                                 Additionally, there should be an entry named Declaration that
  210.      *                                  is expected to contain the portion of the field declaration already
  211.      *                                  in DBMS specific SQL code as it is used in the CREATE TABLE statement.
  212.      *
  213.      *                             removed_fields
  214.      *
  215.      *                                 Associative array with the names of fields to be removed as indexes
  216.      *                                  of the array. Currently the values assigned to each entry are ignored.
  217.      *                                  An empty array should be used for future compatibility.
  218.      *
  219.      *                             renamed_fields
  220.      *
  221.      *                                 Associative array with the names of fields to be renamed as indexes
  222.      *                                  of the array. The value of each entry of the array should be set to
  223.      *                                  another associative array with the entry named name with the new
  224.      *                                  field name and the entry named Declaration that is expected to contain
  225.      *                                  the portion of the field declaration already in DBMS specific SQL code
  226.      *                                  as it is used in the CREATE TABLE statement.
  227.      *
  228.      *                             changed_fields
  229.      *
  230.      *                                 Associative array with the names of the fields to be changed as indexes
  231.      *                                  of the array. Keep in mind that if it is intended to change either the
  232.      *                                  name of a field and any other properties, the changed_fields array entries
  233.      *                                  should have the new names of the fields as array indexes.
  234.      *
  235.      *                                 The value of each entry of the array should be set to another associative
  236.      *                                  array with the properties of the fields to that are meant to be changed as
  237.      *                                  array entries. These entries should be assigned to the new values of the
  238.      *                                  respective properties. The properties of the fields should be the same
  239.      *                                  as defined by the Metabase parser.
  240.      *
  241.      *                                 If the default property is meant to be added, removed or changed, there
  242.      *                                  should also be an entry with index ChangedDefault assigned to 1. Similarly,
  243.      *                                  if the notnull constraint is to be added or removed, there should also be
  244.      *                                  an entry with index ChangedNotNull assigned to 1.
  245.      *
  246.      *                                 Additionally, there should be an entry named Declaration that is expected
  247.      *                                  to contain the portion of the field changed declaration already in DBMS
  248.      *                                  specific SQL code as it is used in the CREATE TABLE statement.
  249.      *                             Example
  250.      *                                 array(
  251.      *                                     'name' => 'userlist',
  252.      *                                     'added_fields' => array(
  253.      *                                         'quota' => array(
  254.      *                                             'type' => 'integer',
  255.      *                                             'unsigned' => 1
  256.      *                                             'declaration' => 'quota INT'
  257.      *                                         )
  258.      *                                     ),
  259.      *                                     'removed_fields' => array(
  260.      *                                         'file_limit' => array(),
  261.      *                                         'time_limit' => array()
  262.      *                                         ),
  263.      *                                     'changed_fields' => array(
  264.      *                                         'gender' => array(
  265.      *                                             'default' => 'M',
  266.      *                                             'change_default' => 1,
  267.      *                                             'declaration' => "gender CHAR(1) DEFAULT 'M'"
  268.      *                                         )
  269.      *                                     ),
  270.      *                                     'renamed_fields' => array(
  271.      *                                         'sex' => array(
  272.      *                                             'name' => 'gender',
  273.      *                                             'declaration' => "gender CHAR(1) DEFAULT 'M'"
  274.      *                                         )
  275.      *                                     )
  276.      *                                 )
  277.      *
  278.      * @param boolean $check     indicates whether the function should just check if the DBMS driver
  279.      *                              can perform the requested table alterations if the value is true or
  280.      *                              actually perform them otherwise.
  281.      * @access public
  282.      *
  283.       * @return mixed MDB2_OK on success, a MDB2 error on failure
  284.      */
  285.     function alterTable($name$changes$check)
  286.     {
  287.         $db =$GLOBALS['_MDB2_databases'][$this->db_index];
  288.         if ($check{
  289.             for ($change = 0,reset($changes);
  290.                 $change count($changes);
  291.                 next($changes)$change++)
  292.             {
  293.                 switch (key($changes)) {
  294.                     case 'added_fields':
  295.                     case 'removed_fields':
  296.                     case 'changed_fields':
  297.                     case 'renamed_fields':
  298.                     case 'name':
  299.                         break;
  300.                     default:
  301.                         return $db->raiseError(MDB2_ERROR_CANNOT_ALTERnullnull,
  302.                             'alterTable: change type "'.key($changes).'" not yet supported');
  303.                 }
  304.             }
  305.             return MDB2_OK;
  306.         else {
  307.             $query (isset($changes['name']'RENAME AS '.$changes['name''');
  308.             if (isset($changes['added_fields'])) {
  309.                 $fields $changes['added_fields'];
  310.                 for ($field = 0reset($fields);
  311.                     $field<count($fields);
  312.                     next($fields)$field++)
  313.                 {
  314.                     if (strcmp($query'')) {
  315.                         $query .= ',';
  316.                     }
  317.                     $query .= 'ADD '.$fields[key($fields)]['declaration'];
  318.                 }
  319.             }
  320.             if (isset($changes['removed_fields'])) {
  321.                 $fields $changes['removed_fields'];
  322.                 for ($field = 0,reset($fields);
  323.                     $field<count($fields);
  324.                     next($fields)$field++)
  325.                 {
  326.                     if (strcmp($query'')) {
  327.                         $query .= ',';
  328.                     }
  329.                     $query .= 'DROP '.key($fields);
  330.                 }
  331.             }
  332.             $renamed_fields = array();
  333.             if (isset($changes['renamed_fields'])) {
  334.                 $fields $changes['renamed_fields'];
  335.                 for ($field = 0,reset($fields);
  336.                     $field<count($fields);
  337.                     next($fields)$field++)
  338.                 {
  339.                     $renamed_fields[$fields[key($fields)]['name']] key($fields);
  340.                 }
  341.             }
  342.             if (isset($changes['changed_fields'])) {
  343.                 $fields $changes['changed_fields'];
  344.                 for ($field = 0,reset($fields);
  345.                     $field<count($fields);
  346.                     next($fields)$field++)
  347.                 {
  348.                     if (strcmp($query'')) {
  349.                         $query .= ',';
  350.                     }
  351.                     if (isset($renamed_fields[key($fields)])) {
  352.                         $field_name $renamed_fields[key($fields)];
  353.                         unset($renamed_fields[key($fields)]);
  354.                     else {
  355.                         $field_name key($fields);
  356.                     }
  357.                     $query .= "CHANGE $field_name ".$fields[key($fields)]['declaration'];
  358.                 }
  359.             }
  360.             if (count($renamed_fields))
  361.             {
  362.                 for ($field = 0,reset($renamed_fields);
  363.                     $field<count($renamed_fields);
  364.                     next($renamed_fields)$field++)
  365.                 {
  366.                     if (strcmp($query'')) {
  367.                         $query .= ',';
  368.                     }
  369.                     $old_field_name $renamed_fields[key($renamed_fields)];
  370.                     $query .= "CHANGE $old_field_name ".$changes['renamed_fields'][$old_field_name]['declaration'];
  371.                 }
  372.             }
  373.             return $db->query("ALTER TABLE $name $query");
  374.         }
  375.     }
  376.  
  377.     // }}}
  378.     // {{{ listDatabases()
  379.  
  380.     /**
  381.      * list all databases
  382.      *
  383.      * @return mixed data array on success, a MDB2 error on failure
  384.      * @access public
  385.      */
  386.     function listDatabases()
  387.     {
  388.         $db =$GLOBALS['_MDB2_databases'][$this->db_index];
  389.         return $db->queryCol('SHOW DATABASES');
  390.     }
  391.  
  392.     // }}}
  393.     // {{{ listUsers()
  394.  
  395.     /**
  396.      * list all users
  397.      *
  398.      * @return mixed data array on success, a MDB2 error on failure
  399.      * @access public
  400.      */
  401.     function listUsers()
  402.     {
  403.         $db =$GLOBALS['_MDB2_databases'][$this->db_index];
  404.         return $db->queryCol('SELECT DISTINCT USER FROM USER');
  405.     }
  406.  
  407.     // }}}
  408.     // {{{ listTables()
  409.  
  410.     /**
  411.      * list all tables in the current database
  412.      *
  413.      * @return mixed data array on success, a MDB2 error on failure
  414.      * @access public
  415.      */
  416.     function listTables()
  417.     {
  418.         $db =$GLOBALS['_MDB2_databases'][$this->db_index];
  419.         $table_names $db->queryCol('SHOW TABLES');
  420.         if (MDB2::isError($table_names)) {
  421.             return $table_names;
  422.         }
  423.         for ($i = 0$j count($table_names)$tables = array()$i $j; ++$i{
  424.             if (!$this->_isSequenceName($table_names[$i]))
  425.                 $tables[$table_names[$i];
  426.         }
  427.         return $tables;
  428.     }
  429.  
  430.     // }}}
  431.     // {{{ listTableFields()
  432.  
  433.     /**
  434.      * list all fields in a tables in the current database
  435.      *
  436.      * @param string $table name of table that should be used in method
  437.      * @return mixed data array on success, a MDB2 error on failure
  438.      * @access public
  439.      */
  440.     function listTableFields($table)
  441.     {
  442.         $db =$GLOBALS['_MDB2_databases'][$this->db_index];
  443.         return $db->queryCol("SHOW COLUMNS FROM $table");
  444.     }
  445.  
  446.     // }}}
  447.     // {{{ createIndex()
  448.  
  449.     /**
  450.      * get the stucture of a field into an array
  451.      *
  452.      * @param string    $table         name of the table on which the index is to be created
  453.      * @param string    $name         name of the index to be created
  454.      * @param array     $definition        associative array that defines properties of the index to be created.
  455.      *                                  Currently, only one property named FIELDS is supported. This property
  456.      *                                  is also an associative with the names of the index fields as array
  457.      *                                  indexes. Each entry of this array is set to another type of associative
  458.      *                                  array that specifies properties of the index that are specific to
  459.      *                                  each field.
  460.      *
  461.      *                                 Currently, only the sorting property is supported. It should be used
  462.      *                                  to define the sorting direction of the index. It may be set to either
  463.      *                                  ascending or descending.
  464.      *
  465.      *                                 Not all DBMS support index sorting direction configuration. The DBMS
  466.      *                                  drivers of those that do not support it ignore this property. Use the
  467.      *                                  function support() to determine whether the DBMS driver can manage indexes.
  468.  
  469.      *                                  Example
  470.      *                                     array(
  471.      *                                         'fields' => array(
  472.      *                                             'user_name' => array(
  473.      *                                                 'sorting' => 'ascending'
  474.      *                                             ),
  475.      *                                             'last_login' => array()
  476.      *                                         )
  477.      *                                     )
  478.      * @return mixed MDB2_OK on success, a MDB2 error on failure
  479.      * @access public
  480.      */
  481.     function createIndex($table$name$definition)
  482.     {
  483.         $db =$GLOBALS['_MDB2_databases'][$this->db_index];
  484.         $query "CREATE ".(isset($definition['unique']'UNIQUE INDEX' 'INDEX')." $name on $table (";
  485.         for ($field = 0reset($definition['fields']);
  486.             $field count($definition['fields']);
  487.             $field++next($definition['fields']))
  488.         {
  489.             if ($field > 0{
  490.                 $query .= ',';
  491.             }
  492.             $query .= key($definition['fields']);
  493.         }
  494.         $query .= ')';
  495.         return $db->query($query);
  496.     }
  497.  
  498.     // }}}
  499.     // {{{ dropIndex()
  500.  
  501.     /**
  502.      * drop existing index
  503.      *
  504.      * @param string    $table         name of table that should be used in method
  505.      * @param string    $name         name of the index to be dropped
  506.      * @return mixed MDB2_OK on success, a MDB2 error on failure
  507.      * @access public
  508.      */
  509.     function dropIndex($table$name)
  510.     {
  511.         $db =$GLOBALS['_MDB2_databases'][$this->db_index];
  512.         return $db->query("ALTER TABLE $table DROP INDEX $name");
  513.     }
  514.  
  515.     // }}}
  516.     // {{{ listTableIndexes()
  517.  
  518.     /**
  519.      * list all indexes in a table
  520.      *
  521.      * @param string    $table      name of table that should be used in method
  522.      * @return mixed data array on success, a MDB2 error on failure
  523.      * @access public
  524.      */
  525.     function listTableIndexes($table)
  526.     {
  527.         $db =$GLOBALS['_MDB2_databases'][$this->db_index];
  528.         $indexes_all $db->queryCol("SHOW INDEX FROM $table"'text''key_name');
  529.         if (MDB2::isError($indexes_all)) {
  530.             return $indexes_all;
  531.         }
  532.  
  533.         for ($found $indexes = array()$index = 0$indexes_all_cnt count($indexes_all);
  534.             $index $indexes_all_cnt;
  535.             $index++
  536.         {
  537.             if ($indexes_all[$index!= 'PRIMARY'
  538.                 && !isset($found[$indexes_all[$index]]))
  539.             {
  540.                 $indexes[$indexes_all[$index];
  541.                 $found[$indexes_all[$index]] = true;
  542.             }
  543.         }
  544.         return $indexes;
  545.     }
  546.  
  547.     // }}}
  548.     // {{{ createSequence()
  549.  
  550.     /**
  551.      * create sequence
  552.      *
  553.      * @param string    $seq_name     name of the sequence to be created
  554.      * @param string    $start         start value of the sequence; default is 1
  555.      * @return mixed MDB2_OK on success, a MDB2 error on failure
  556.      * @access public
  557.      */
  558.     function createSequence($seq_name$start = 1)
  559.     {
  560.         $db =$GLOBALS['_MDB2_databases'][$this->db_index];
  561.         $sequence_name $db->getSequenceName($seq_name);
  562.         $seqname_col_name $db->options['seqname_col_name'];
  563.         $query = "CREATE TABLE $sequence_name ($seqname_col_name INTEGER DEFAULT UNIQUE, PRIMARY KEY($seqname_col_name))";
  564.         $res $db->query($query);
  565.         $res $db->query("SET UNIQUE = 1 FOR $sequence_name");
  566.         if (MDB2::isError($res)) {
  567.             return $res;
  568.         }
  569.         if ($start == 1{
  570.             return MDB2_OK;
  571.         }
  572.         $res $db->query("INSERT INTO $sequence_name VALUES (".($start-1).')');
  573.         if (!MDB2::isError($res)) {
  574.             return MDB2_OK;
  575.         }
  576.         // Handle error
  577.         $result $db->query("DROP TABLE $sequence_name");
  578.         if (MDB2::isError($result)) {
  579.             return $db->raiseError(MDB2_ERRORnullnull,
  580.                 'createSequence: could not drop inconsistent sequence table ('.
  581.                 $result->getMessage().' ('.$result->getUserinfo().'))');
  582.         }
  583.         return $db->raiseError(MDB2_ERRORnullnull,
  584.             'createSequence: could not create sequence table ('.
  585.             $res->getMessage().' ('.$res->getUserinfo().'))');
  586.     }
  587.  
  588.     // }}}
  589.     // {{{ dropSequence()
  590.  
  591.     /**
  592.      * drop existing sequence
  593.      *
  594.      * @param string    $seq_name     name of the sequence to be dropped
  595.      * @return mixed MDB2_OK on success, a MDB2 error on failure
  596.      * @access public
  597.      */
  598.     function dropSequence($seq_name)
  599.     {
  600.         $db =$GLOBALS['_MDB2_databases'][$this->db_index];
  601.         $sequence_name $db->getSequenceName($seq_name);
  602.         return $db->query("DROP TABLE $sequence_name CASCADE");
  603.     }
  604.  
  605.     // }}}
  606.     // {{{ listSequences()
  607.  
  608.     /**
  609.      * list all sequences in the current database
  610.      *
  611.      * @return mixed data array on success, a MDB2 error on failure
  612.      * @access public
  613.      */
  614.     function listSequences()
  615.     {
  616.         $db =$GLOBALS['_MDB2_databases'][$this->db_index];
  617.         $table_names $db->queryCol('SHOW TABLES''text');
  618.         if (MDB2::isError($table_names)) {
  619.             return $table_names;
  620.         }
  621.         for ($i = 0$j count($table_names)$sequences = array()$i $j; ++$i)
  622.         {
  623.             if ($sqn $this->_isSequenceName($table_names[$i]))
  624.                 $sequences[$sqn;
  625.         }
  626.         return $sequences;
  627.     }
  628.     // }}}
  629. }
  630.  
  631. ?>

Documentation generated on Mon, 11 Mar 2019 10:15:45 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.