cvs: pear /MDB/MDB/Modules/Manager mysql.php
| From: | Lukas Smith | Date: | Tue, 03 Dec 2002 11:30:45 +0000 |
| Subject: | cvs: pear /MDB/MDB/Modules/Manager mysql.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-7729@lists.php.net to get a copy of this message | ||
lsmith Tue Dec 3 06:30:45 2002 EDT
Modified files:
/pear/MDB/MDB/Modules/Manager mysql.php
Log:
phpdoc comment fixes
switched to SQL commands instead of mysql_[create|drop]_db which are deprecated
Index: pear/MDB/MDB/Modules/Manager/mysql.php diff -u pear/MDB/MDB/Modules/Manager/mysql.php:1.39 pear/MDB/MDB/Modules/Manager/mysql.php:1.40 --- pear/MDB/MDB/Modules/Manager/mysql.php:1.39 Sat Nov 23 18:51:25 2002 +++ pear/MDB/MDB/Modules/Manager/mysql.php Tue Dec 3 06:30:45 2002 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: mysql.php,v 1.39 2002/11/23 23:51:25 lsmith Exp $ +// $Id: mysql.php,v 1.40 2002/12/03 11:30:45 lsmith Exp $ // if(!defined('MDB_MANAGER_MYSQL_INCLUDED')) @@ -70,7 +70,7 @@ /** * verify that chosen transactional table hanlder is available in the database * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @param string $table_type name of the table handler * @return mixed MDB_OK on success, a MDB error on failure * @access private @@ -130,7 +130,7 @@ /** * create a new database * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @param string $name name of the database that should be created * @return mixed MDB_OK on success, a MDB error on failure * @access public @@ -140,7 +140,8 @@ if (MDB::isError($result = $db->connect())) { return $result; } - if (!mysql_create_db($name, $db->connection)) { + $query = "CREATE DATABASE " . $name; + if(MDB::isError($db->query($query))) { return $db->mysqlRaiseError(); } @@ -153,7 +154,7 @@ /** * drop an existing database * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @param string $name name of the database that should be dropped * @return mixed MDB_OK on success, a MDB error on failure * @access public @@ -163,7 +164,8 @@ if (MDB::isError($result = $db->connect())) { return $result; } - if (!mysql_drop_db($name, $db->connection)) { + $query = "DROP DATABASE " . $name; + if(MDB::isError($db->query($query))) { return $db->mysqlRaiseError(); } return (MDB_OK); @@ -175,7 +177,7 @@ /** * create a new table * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @param string $name Name of the database that should be created * @param array $fields Associative array that contains the definition of each field of the new table * The indexes of the array entries are the names of the fields of the table an @@ -233,7 +235,7 @@ /** * alter an existing table * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @param string $name name of the table that is intended to be changed. * @param array $changes associative array that contains the details of each type * of change that is intended to be performed. The types of @@ -424,7 +426,7 @@ /** * list all databases * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @return mixed data array on success, a MDB error on failure * @access public */ @@ -443,7 +445,7 @@ /** * list all users * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @return mixed data array on success, a MDB error on failure * @access public */ @@ -462,7 +464,7 @@ /** * list all tables in the current database * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @return mixed data array on success, a MDB error on failure * @access public */ @@ -486,7 +488,7 @@ /** * list all fields in a tables in the current database * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @param string $table name of table that should be used in method * @return mixed data array on success, a MDB error on failure * @access public @@ -523,7 +525,7 @@ /** * get the stucture of a field into an array * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @param string $table name of table that should be used in method * @param string $field_name name of field that should be used in method * @return mixed data array on success, a MDB error on failure @@ -728,7 +730,7 @@ /** * get the stucture of a field into an array * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @param string $table name of the table on which the index is to be created * @param string $name name of the index to be created * @param array $definition associative array that defines properties of the index to be created. @@ -780,7 +782,7 @@ /** * drop existing index * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @param string $table name of table that should be used in method * @param string $name name of the index to be dropped * @return mixed MDB_OK on success, a MDB error on failure @@ -797,7 +799,7 @@ /** * list all indexes in a table * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @param string $table name of table that should be used in method * @return mixed data array on success, a MDB error on failure * @access public @@ -829,7 +831,7 @@ /** * get the stucture of an index into an array * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @param string $table name of table that should be used in method * @param string $index_name name of index that should be used in method * @return mixed data array on success, a MDB error on failure @@ -870,7 +872,7 @@ /** * create sequence * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @param string $seq_name name of the sequence to be created * @param string $start start value of the sequence; default is 1 * @return mixed MDB_OK on success, a MDB error on failure @@ -909,7 +911,7 @@ /** * drop existing sequence * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @param string $seq_name name of the sequence to be dropped * @return mixed MDB_OK on success, a MDB error on failure * @access public @@ -926,7 +928,7 @@ /** * list all sequences in the current database * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @return mixed data array on success, a MDB error on failure * @access public */
Index: pear/MDB/MDB/Modules/Manager/mysql.php diff -u pear/MDB/MDB/Modules/Manager/mysql.php:1.39 pear/MDB/MDB/Modules/Manager/mysql.php:1.40 --- pear/MDB/MDB/Modules/Manager/mysql.php:1.39 Sat Nov 23 18:51:25 2002 +++ pear/MDB/MDB/Modules/Manager/mysql.php Tue Dec 3 06:30:45 2002 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: mysql.php,v 1.39 2002/11/23 23:51:25 lsmith Exp $ +// $Id: mysql.php,v 1.40 2002/12/03 11:30:45 lsmith Exp $ // if(!defined('MDB_MANAGER_MYSQL_INCLUDED')) @@ -70,7 +70,7 @@ /** * verify that chosen transactional table hanlder is available in the database * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @param string $table_type name of the table handler * @return mixed MDB_OK on success, a MDB error on failure * @access private @@ -130,7 +130,7 @@ /** * create a new database * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @param string $name name of the database that should be created * @return mixed MDB_OK on success, a MDB error on failure * @access public @@ -140,7 +140,8 @@ if (MDB::isError($result = $db->connect())) { return $result; } - if (!mysql_create_db($name, $db->connection)) { + $query = "CREATE DATABASE " . $name; + if(MDB::isError($db->query($query))) { return $db->mysqlRaiseError(); } @@ -153,7 +154,7 @@ /** * drop an existing database * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @param string $name name of the database that should be dropped * @return mixed MDB_OK on success, a MDB error on failure * @access public @@ -163,7 +164,8 @@ if (MDB::isError($result = $db->connect())) { return $result; } - if (!mysql_drop_db($name, $db->connection)) { + $query = "DROP DATABASE " . $name; + if(MDB::isError($db->query($query))) { return $db->mysqlRaiseError(); } return (MDB_OK); @@ -175,7 +177,7 @@ /** * create a new table * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @param string $name Name of the database that should be created * @param array $fields Associative array that contains the definition of each field of the new table * The indexes of the array entries are the names of the fields of the table an @@ -233,7 +235,7 @@ /** * alter an existing table * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @param string $name name of the table that is intended to be changed. * @param array $changes associative array that contains the details of each type * of change that is intended to be performed. The types of @@ -424,7 +426,7 @@ /** * list all databases * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @return mixed data array on success, a MDB error on failure * @access public */ @@ -443,7 +445,7 @@ /** * list all users * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @return mixed data array on success, a MDB error on failure * @access public */ @@ -462,7 +464,7 @@ /** * list all tables in the current database * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @return mixed data array on success, a MDB error on failure * @access public */ @@ -486,7 +488,7 @@ /** * list all fields in a tables in the current database * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @param string $table name of table that should be used in method * @return mixed data array on success, a MDB error on failure * @access public @@ -523,7 +525,7 @@ /** * get the stucture of a field into an array * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @param string $table name of table that should be used in method * @param string $field_name name of field that should be used in method * @return mixed data array on success, a MDB error on failure @@ -728,7 +730,7 @@ /** * get the stucture of a field into an array * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @param string $table name of the table on which the index is to be created * @param string $name name of the index to be created * @param array $definition associative array that defines properties of the index to be created. @@ -780,7 +782,7 @@ /** * drop existing index * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @param string $table name of table that should be used in method * @param string $name name of the index to be dropped * @return mixed MDB_OK on success, a MDB error on failure @@ -797,7 +799,7 @@ /** * list all indexes in a table * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @param string $table name of table that should be used in method * @return mixed data array on success, a MDB error on failure * @access public @@ -829,7 +831,7 @@ /** * get the stucture of an index into an array * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @param string $table name of table that should be used in method * @param string $index_name name of index that should be used in method * @return mixed data array on success, a MDB error on failure @@ -870,7 +872,7 @@ /** * create sequence * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @param string $seq_name name of the sequence to be created * @param string $start start value of the sequence; default is 1 * @return mixed MDB_OK on success, a MDB error on failure @@ -909,7 +911,7 @@ /** * drop existing sequence * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @param string $seq_name name of the sequence to be dropped * @return mixed MDB_OK on success, a MDB error on failure * @access public @@ -926,7 +928,7 @@ /** * list all sequences in the current database * - * @param object $dbs database object that is extended by this class + * @param object $db database object that is extended by this class * @return mixed data array on success, a MDB error on failure * @access public */