cvs: php4 /pear DB.php /pear/DB common.php ibase.php msql.php mssql.php mysql.php oci8.php odbc.php pgsql.php sybase.php
| From: | Stig Bakken | Date: | Sun, 10 Dec 2000 01:32:16 +0000 |
| Subject: | cvs: php4 /pear DB.php /pear/DB common.php ibase.php msql.php mssql.php mysql.php oci8.php odbc.php pgsql.php sybase.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-3048@lists.php.net to get a copy of this message | ||
ssb Sat Dec 9 17:32:16 2000 EDT
Modified files:
/php4/pear DB.php
/php4/pear/DB common.php ibase.php msql.php mssql.php mysql.php
oci8.php odbc.php pgsql.php sybase.php
Log:
* DB::isManip counts "REPLACE" as a manipulation command (MySQL specific)
* renamed DB_common::execute_emulate_query to DB_common::executeEmulateQuery
* moved "query" DB method to DB_common, there was duplicated logic in query
and simpleQuery in all backends.
Index: php4/pear/DB.php diff -u php4/pear/DB.php:1.41 php4/pear/DB.php:1.42 --- php4/pear/DB.php:1.41 Thu Dec 7 18:30:43 2000 +++ php4/pear/DB.php Sat Dec 9 17:32:16 2000 @@ -17,7 +17,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: DB.php,v 1.41 2000/12/08 02:30:43 ssb Exp $ +// $Id: DB.php,v 1.42 2000/12/10 01:32:16 ssb Exp $ // // Database independent query interface. // @@ -259,7 +259,7 @@ */ function isManip($query) { - if (preg_match('/^\s*(INSERT|UPDATE|DELETE)\s+/i', $query)) { + if (preg_match('/^\s*(INSERT|UPDATE|DELETE|REPLACE)\s+/i', $query)) { return true; } return false; Index: php4/pear/DB/common.php diff -u php4/pear/DB/common.php:1.29 php4/pear/DB/common.php:1.30 --- php4/pear/DB/common.php:1.29 Thu Dec 7 18:30:43 2000 +++ php4/pear/DB/common.php Sat Dec 9 17:32:16 2000 @@ -315,14 +315,14 @@ } // }}} - // {{{ execute_emulate_query() + // {{{ executeEmulateQuery() /** * @return a string containing the real query run when emulating * prepare/execute. A DB error code is returned on failure. */ - function execute_emulate_query($stmt, $data = false) + function executeEmulateQuery($stmt, $data = false) { $p = &$this->prepare_tokens; $stmt = (int)$this->prepare_maxstmt++; @@ -395,6 +395,49 @@ } } return DB_OK; + } + + // }}} + // {{{ modifyQuery() + + /** + * This method is used by backends to alter queries for various + * reasons. It is defined here to assure that all implementations + * have this method defined. + * + * @access private + * + * @param query to modify + * + * @return the new (modified) query + */ + function modifyQuery($query) { + return $query; + } + + // }}} + // {{{ query() + + /** + * Send a query to the database and return any results with a + * DB_result object. + * + * @access public + * + * @param the SQL query + * + * @return object a DB_result object or DB_OK on success, a DB + * error on failure + * + * @see DB::isError + */ + function &query($query) { + $result = $this->simpleQuery($query); + if (DB::isError($result) || $result === DB_OK) { + return $result; + } else { + return new DB_result($this, $result); + } } // }}} Index: php4/pear/DB/ibase.php diff -u php4/pear/DB/ibase.php:1.11 php4/pear/DB/ibase.php:1.12 --- php4/pear/DB/ibase.php:1.11 Thu Dec 7 18:30:43 2000 +++ php4/pear/DB/ibase.php Sat Dec 9 17:32:16 2000 @@ -16,7 +16,7 @@ // | Authors: Sterling Hughes <sterling@php.net> | // +----------------------------------------------------------------------+ // -// $Id: ibase.php,v 1.11 2000/12/08 02:30:43 ssb Exp $ +// $Id: ibase.php,v 1.12 2000/12/10 01:32:16 ssb Exp $ // // Database independent query interface definition for PHP's Interbase // extension. @@ -74,21 +74,6 @@ function disconnect() { return @ibase_close($this->connection); - } - - function &query($stmt) - { - $this->last_query = $query; - $result = @ibase_query($this->connection, $stmt); - if (!$result) { - return $this->raiseError(); - } - if ($this->autocommit) { - ibase_commit($this->connection); - } - // Determine which queries that should return data, and which - // should return an error code only. - return DB::isManip($stmt) ? DB_OK : new DB_result($this, $result); } function simpleQuery($stmt) Index: php4/pear/DB/msql.php diff -u php4/pear/DB/msql.php:1.10 php4/pear/DB/msql.php:1.11 --- php4/pear/DB/msql.php:1.10 Thu Dec 7 18:30:43 2000 +++ php4/pear/DB/msql.php Sat Dec 9 17:32:16 2000 @@ -16,7 +16,7 @@ // | Authors: Sterling Hughes <sterling@php.net> | // +----------------------------------------------------------------------+ // -// $Id: msql.php,v 1.10 2000/12/08 02:30:43 ssb Exp $ +// $Id: msql.php,v 1.11 2000/12/10 01:32:16 ssb Exp $ // // Database independent query interface definition for PHP's Mini-SQL // extension. @@ -75,17 +75,6 @@ return @msql_close($this->connection); } - function &query( $stmt ) { - $this->last_query = $stmt; - $result = @msql_query($stmt, $this->connection); - if (!$result) { - return $this->raiseError(); - } - // Determine which queries that should return data, and which - // should return an error code only. - return DB::isManip($stmt) ? DB_OK : new DB_result($this, $result); - } - function simpleQuery($stmt) { $this->last_query = $stmt; $result = @msql_query($stmt, $this->connection); @@ -169,7 +158,7 @@ } function execute($stmt, $data = false) { - $realquery = $this->execute_emulate_query($stmt, $data); + $realquery = $this->executeEmulateQuery($stmt, $data); $this->last_query = $realquery; $result = @msql_query($realquery, $this->connection); if (!$result) { Index: php4/pear/DB/mssql.php diff -u php4/pear/DB/mssql.php:1.13 php4/pear/DB/mssql.php:1.14 --- php4/pear/DB/mssql.php:1.13 Thu Dec 7 18:30:43 2000 +++ php4/pear/DB/mssql.php Sat Dec 9 17:32:16 2000 @@ -16,7 +16,7 @@ // | Authors: Sterling Hughes <sterling@php.net> | // +----------------------------------------------------------------------+ // -// $Id: mssql.php,v 1.13 2000/12/08 02:30:43 ssb Exp $ +// $Id: mssql.php,v 1.14 2000/12/10 01:32:16 ssb Exp $ // // Database independent query interface definition for PHP's Microsoft SQL Server // extension. @@ -75,17 +75,6 @@ return @mssql_close($this->connection); } - function &query( $stmt ) { - $this->last_query = $query; - $result = @mssql_query($stmt, $this->connection); - if (!$result) { - return $this->raiseError(); - } - // Determine which queries that should return data, and which - // should return an error code only. - return DB::isManip($stmt) ? DB_OK : new DB_result($this, $result); - } - function simpleQuery($stmt) { $this->last_query = $query; $result = @mssql_query($stmt, $this->connection); @@ -169,7 +158,7 @@ } function execute($stmt, $data = false) { - $realquery = $this->execute_emulate_query($stmt, $data); + $realquery = $this->executeEmulateQuery($stmt, $data); $this->last_query = $realquery; $result = @mssql_query($realquery, $this->connection); if (!$result) { Index: php4/pear/DB/mysql.php diff -u php4/pear/DB/mysql.php:1.37 php4/pear/DB/mysql.php:1.38 --- php4/pear/DB/mysql.php:1.37 Sat Dec 9 17:13:12 2000 +++ php4/pear/DB/mysql.php Sat Dec 9 17:32:16 2000 @@ -143,33 +143,6 @@ } // }}} - // {{{ query() - - /** - * Send a query to MySQL and return the results as a DB_result object. - * - * @param $query the SQL query - * - * @access public - * - * @return object a DB_result object on success, a DB error - * on failure - */ - function &query($query) { - $this->last_query = $query; - - $result = @mysql_query( $query, $this->connection ); - - if (!$result) { - return $this->raiseError($this->errorCode(mysql_errno($this->connection))); - } - - // Determine which queries that should return data, and which - // should return an error code only. - return DB::isManip($query) ? DB_OK : new DB_result($this, $result); - } - - // }}} // {{{ simpleQuery() /** @@ -444,7 +417,7 @@ * @see DB_mysql::prepare */ function execute($stmt, $data = false) { - $realquery = $this->execute_emulate_query($stmt, $data); + $realquery = $this->executeEmulateQuery($stmt, $data); $this->last_query = $realquery; $result = mysql_query($realquery, $this->connection); if (!$result) { Index: php4/pear/DB/oci8.php diff -u php4/pear/DB/oci8.php:1.10 php4/pear/DB/oci8.php:1.11 --- php4/pear/DB/oci8.php:1.10 Thu Dec 7 18:30:43 2000 +++ php4/pear/DB/oci8.php Sat Dec 9 17:32:16 2000 @@ -109,39 +109,6 @@ } // }}} - // {{{ query() - - - /** - * Send a query to the database and return the results as a DB_result object. - * - * @param $query the SQL query - * - * @return object a DB_result object on success, a DB error code - * on failure - */ - function &query($query) { - $this->last_query = $query; - $result = OCIParse($this->connection, $query); - if (!$result) { - return $this->raiseError(); - } - if ($this->autoCommit) { - $success=OCIExecute($result,OCI_COMMIT_ON_SUCCESS); - } - else { - $success=OCIExecute($result,OCI_DEFAULT); - } - if (!$success) { - return $this->raiseError(); - } - $this->last_stmt=$result; - // Determine which queries that should return data, and which - // should return an error code only. - return DB::isManip($query) ? DB_OK : new DB_result($this, $result); - } - - // }}} // {{{ simpleQuery() /** Index: php4/pear/DB/odbc.php diff -u php4/pear/DB/odbc.php:1.17 php4/pear/DB/odbc.php:1.18 --- php4/pear/DB/odbc.php:1.17 Thu Dec 7 18:30:43 2000 +++ php4/pear/DB/odbc.php Sat Dec 9 17:32:16 2000 @@ -152,20 +152,6 @@ } // }}} - // {{{ query() - - function query($query) { - $this->last_query = $query; - $result = odbc_exec($this->connection, $query); - if (!$result) { - return $this->raiseError(); // XXX ERRORMSG - } - // Determine which queries that should return data, and which - // should return an error code only. - return DB::isManip($query) ? DB_OK : new DB_result($this, $result); - } - - // }}} // {{{ simpleQuery() /** Index: php4/pear/DB/pgsql.php diff -u php4/pear/DB/pgsql.php:1.20 php4/pear/DB/pgsql.php:1.21 --- php4/pear/DB/pgsql.php:1.20 Sat Dec 9 16:51:26 2000 +++ php4/pear/DB/pgsql.php Sat Dec 9 17:32:16 2000 @@ -132,27 +132,6 @@ } // }}} - // {{{ query() - - - /** - * Send a query to PostgreSQL and return the results as a DB_result object. - * - * @param $query the SQL query - * - * @return object a DB_result object on success, a DB error code - * on failure - */ - function &query($query) { - $result = $this->simpleQuery($query); - if (DB::isError($result) || $result === DB_OK) { - return $result; - } else { - return new DB_result($this, $result); - } - } - - // }}} // {{{ simpleQuery() /** @@ -383,7 +362,7 @@ * code is returned on failure. */ function execute($stmt, $data = false) { - $realquery = $this->execute_emulate_query($stmt, $data); + $realquery = $this->executeEmulateQuery($stmt, $data); $this->last_query = $realquery; $result = $this->simpleQuery($realquery); if (DB::isError($result) || $result === DB_OK) { Index: php4/pear/DB/sybase.php diff -u php4/pear/DB/sybase.php:1.9 php4/pear/DB/sybase.php:1.10 --- php4/pear/DB/sybase.php:1.9 Thu Dec 7 18:30:43 2000 +++ php4/pear/DB/sybase.php Sat Dec 9 17:32:16 2000 @@ -16,7 +16,7 @@ // | Authors: Sterling Hughes <sterling@php.net> | // +----------------------------------------------------------------------+ // -// $Id: sybase.php,v 1.9 2000/12/08 02:30:43 ssb Exp $ +// $Id: sybase.php,v 1.10 2000/12/10 01:32:16 ssb Exp $ // // Database independent query interface definition for PHP's Sybase // extension. @@ -65,18 +65,6 @@ return @sybase_close($this->connection); } - function &query($stmt) - { - $this->last_query = $stmt; - $result = @sybase_query($stmt, $this->connection); - if (!$result) { - return $this->raiseError(); - } - // Determine which queries that should return data, and which - // should return an error code only. - return DB::isManip($stmt) ? DB_OK : new DB_result($this, $result); - } - function simpleQuery($stmt) { $this->last_query = $stmt; @@ -159,7 +147,7 @@ function execute($stmt, $data = false) { - $realquery = $this->execute_emulate_query($stmt, $data); + $realquery = $this->executeEmulateQuery($stmt, $data); $this->last_query = $realquery; $result = @sybase_query($realquery, $this->connection); if (!$result) {
Index: php4/pear/DB.php diff -u php4/pear/DB.php:1.41 php4/pear/DB.php:1.42 --- php4/pear/DB.php:1.41 Thu Dec 7 18:30:43 2000 +++ php4/pear/DB.php Sat Dec 9 17:32:16 2000 @@ -17,7 +17,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: DB.php,v 1.41 2000/12/08 02:30:43 ssb Exp $ +// $Id: DB.php,v 1.42 2000/12/10 01:32:16 ssb Exp $ // // Database independent query interface. // @@ -259,7 +259,7 @@ */ function isManip($query) { - if (preg_match('/^\s*(INSERT|UPDATE|DELETE)\s+/i', $query)) { + if (preg_match('/^\s*(INSERT|UPDATE|DELETE|REPLACE)\s+/i', $query)) { return true; } return false; Index: php4/pear/DB/common.php diff -u php4/pear/DB/common.php:1.29 php4/pear/DB/common.php:1.30 --- php4/pear/DB/common.php:1.29 Thu Dec 7 18:30:43 2000 +++ php4/pear/DB/common.php Sat Dec 9 17:32:16 2000 @@ -315,14 +315,14 @@ } // }}} - // {{{ execute_emulate_query() + // {{{ executeEmulateQuery() /** * @return a string containing the real query run when emulating * prepare/execute. A DB error code is returned on failure. */ - function execute_emulate_query($stmt, $data = false) + function executeEmulateQuery($stmt, $data = false) { $p = &$this->prepare_tokens; $stmt = (int)$this->prepare_maxstmt++; @@ -395,6 +395,49 @@ } } return DB_OK; + } + + // }}} + // {{{ modifyQuery() + + /** + * This method is used by backends to alter queries for various + * reasons. It is defined here to assure that all implementations + * have this method defined. + * + * @access private + * + * @param query to modify + * + * @return the new (modified) query + */ + function modifyQuery($query) { + return $query; + } + + // }}} + // {{{ query() + + /** + * Send a query to the database and return any results with a + * DB_result object. + * + * @access public + * + * @param the SQL query + * + * @return object a DB_result object or DB_OK on success, a DB + * error on failure + * + * @see DB::isError + */ + function &query($query) { + $result = $this->simpleQuery($query); + if (DB::isError($result) || $result === DB_OK) { + return $result; + } else { + return new DB_result($this, $result); + } } // }}} Index: php4/pear/DB/ibase.php diff -u php4/pear/DB/ibase.php:1.11 php4/pear/DB/ibase.php:1.12 --- php4/pear/DB/ibase.php:1.11 Thu Dec 7 18:30:43 2000 +++ php4/pear/DB/ibase.php Sat Dec 9 17:32:16 2000 @@ -16,7 +16,7 @@ // | Authors: Sterling Hughes <sterling@php.net> | // +----------------------------------------------------------------------+ // -// $Id: ibase.php,v 1.11 2000/12/08 02:30:43 ssb Exp $ +// $Id: ibase.php,v 1.12 2000/12/10 01:32:16 ssb Exp $ // // Database independent query interface definition for PHP's Interbase // extension. @@ -74,21 +74,6 @@ function disconnect() { return @ibase_close($this->connection); - } - - function &query($stmt) - { - $this->last_query = $query; - $result = @ibase_query($this->connection, $stmt); - if (!$result) { - return $this->raiseError(); - } - if ($this->autocommit) { - ibase_commit($this->connection); - } - // Determine which queries that should return data, and which - // should return an error code only. - return DB::isManip($stmt) ? DB_OK : new DB_result($this, $result); } function simpleQuery($stmt) Index: php4/pear/DB/msql.php diff -u php4/pear/DB/msql.php:1.10 php4/pear/DB/msql.php:1.11 --- php4/pear/DB/msql.php:1.10 Thu Dec 7 18:30:43 2000 +++ php4/pear/DB/msql.php Sat Dec 9 17:32:16 2000 @@ -16,7 +16,7 @@ // | Authors: Sterling Hughes <sterling@php.net> | // +----------------------------------------------------------------------+ // -// $Id: msql.php,v 1.10 2000/12/08 02:30:43 ssb Exp $ +// $Id: msql.php,v 1.11 2000/12/10 01:32:16 ssb Exp $ // // Database independent query interface definition for PHP's Mini-SQL // extension. @@ -75,17 +75,6 @@ return @msql_close($this->connection); } - function &query( $stmt ) { - $this->last_query = $stmt; - $result = @msql_query($stmt, $this->connection); - if (!$result) { - return $this->raiseError(); - } - // Determine which queries that should return data, and which - // should return an error code only. - return DB::isManip($stmt) ? DB_OK : new DB_result($this, $result); - } - function simpleQuery($stmt) { $this->last_query = $stmt; $result = @msql_query($stmt, $this->connection); @@ -169,7 +158,7 @@ } function execute($stmt, $data = false) { - $realquery = $this->execute_emulate_query($stmt, $data); + $realquery = $this->executeEmulateQuery($stmt, $data); $this->last_query = $realquery; $result = @msql_query($realquery, $this->connection); if (!$result) { Index: php4/pear/DB/mssql.php diff -u php4/pear/DB/mssql.php:1.13 php4/pear/DB/mssql.php:1.14 --- php4/pear/DB/mssql.php:1.13 Thu Dec 7 18:30:43 2000 +++ php4/pear/DB/mssql.php Sat Dec 9 17:32:16 2000 @@ -16,7 +16,7 @@ // | Authors: Sterling Hughes <sterling@php.net> | // +----------------------------------------------------------------------+ // -// $Id: mssql.php,v 1.13 2000/12/08 02:30:43 ssb Exp $ +// $Id: mssql.php,v 1.14 2000/12/10 01:32:16 ssb Exp $ // // Database independent query interface definition for PHP's Microsoft SQL Server // extension. @@ -75,17 +75,6 @@ return @mssql_close($this->connection); } - function &query( $stmt ) { - $this->last_query = $query; - $result = @mssql_query($stmt, $this->connection); - if (!$result) { - return $this->raiseError(); - } - // Determine which queries that should return data, and which - // should return an error code only. - return DB::isManip($stmt) ? DB_OK : new DB_result($this, $result); - } - function simpleQuery($stmt) { $this->last_query = $query; $result = @mssql_query($stmt, $this->connection); @@ -169,7 +158,7 @@ } function execute($stmt, $data = false) { - $realquery = $this->execute_emulate_query($stmt, $data); + $realquery = $this->executeEmulateQuery($stmt, $data); $this->last_query = $realquery; $result = @mssql_query($realquery, $this->connection); if (!$result) { Index: php4/pear/DB/mysql.php diff -u php4/pear/DB/mysql.php:1.37 php4/pear/DB/mysql.php:1.38 --- php4/pear/DB/mysql.php:1.37 Sat Dec 9 17:13:12 2000 +++ php4/pear/DB/mysql.php Sat Dec 9 17:32:16 2000 @@ -143,33 +143,6 @@ } // }}} - // {{{ query() - - /** - * Send a query to MySQL and return the results as a DB_result object. - * - * @param $query the SQL query - * - * @access public - * - * @return object a DB_result object on success, a DB error - * on failure - */ - function &query($query) { - $this->last_query = $query; - - $result = @mysql_query( $query, $this->connection ); - - if (!$result) { - return $this->raiseError($this->errorCode(mysql_errno($this->connection))); - } - - // Determine which queries that should return data, and which - // should return an error code only. - return DB::isManip($query) ? DB_OK : new DB_result($this, $result); - } - - // }}} // {{{ simpleQuery() /** @@ -444,7 +417,7 @@ * @see DB_mysql::prepare */ function execute($stmt, $data = false) { - $realquery = $this->execute_emulate_query($stmt, $data); + $realquery = $this->executeEmulateQuery($stmt, $data); $this->last_query = $realquery; $result = mysql_query($realquery, $this->connection); if (!$result) { Index: php4/pear/DB/oci8.php diff -u php4/pear/DB/oci8.php:1.10 php4/pear/DB/oci8.php:1.11 --- php4/pear/DB/oci8.php:1.10 Thu Dec 7 18:30:43 2000 +++ php4/pear/DB/oci8.php Sat Dec 9 17:32:16 2000 @@ -109,39 +109,6 @@ } // }}} - // {{{ query() - - - /** - * Send a query to the database and return the results as a DB_result object. - * - * @param $query the SQL query - * - * @return object a DB_result object on success, a DB error code - * on failure - */ - function &query($query) { - $this->last_query = $query; - $result = OCIParse($this->connection, $query); - if (!$result) { - return $this->raiseError(); - } - if ($this->autoCommit) { - $success=OCIExecute($result,OCI_COMMIT_ON_SUCCESS); - } - else { - $success=OCIExecute($result,OCI_DEFAULT); - } - if (!$success) { - return $this->raiseError(); - } - $this->last_stmt=$result; - // Determine which queries that should return data, and which - // should return an error code only. - return DB::isManip($query) ? DB_OK : new DB_result($this, $result); - } - - // }}} // {{{ simpleQuery() /** Index: php4/pear/DB/odbc.php diff -u php4/pear/DB/odbc.php:1.17 php4/pear/DB/odbc.php:1.18 --- php4/pear/DB/odbc.php:1.17 Thu Dec 7 18:30:43 2000 +++ php4/pear/DB/odbc.php Sat Dec 9 17:32:16 2000 @@ -152,20 +152,6 @@ } // }}} - // {{{ query() - - function query($query) { - $this->last_query = $query; - $result = odbc_exec($this->connection, $query); - if (!$result) { - return $this->raiseError(); // XXX ERRORMSG - } - // Determine which queries that should return data, and which - // should return an error code only. - return DB::isManip($query) ? DB_OK : new DB_result($this, $result); - } - - // }}} // {{{ simpleQuery() /** Index: php4/pear/DB/pgsql.php diff -u php4/pear/DB/pgsql.php:1.20 php4/pear/DB/pgsql.php:1.21 --- php4/pear/DB/pgsql.php:1.20 Sat Dec 9 16:51:26 2000 +++ php4/pear/DB/pgsql.php Sat Dec 9 17:32:16 2000 @@ -132,27 +132,6 @@ } // }}} - // {{{ query() - - - /** - * Send a query to PostgreSQL and return the results as a DB_result object. - * - * @param $query the SQL query - * - * @return object a DB_result object on success, a DB error code - * on failure - */ - function &query($query) { - $result = $this->simpleQuery($query); - if (DB::isError($result) || $result === DB_OK) { - return $result; - } else { - return new DB_result($this, $result); - } - } - - // }}} // {{{ simpleQuery() /** @@ -383,7 +362,7 @@ * code is returned on failure. */ function execute($stmt, $data = false) { - $realquery = $this->execute_emulate_query($stmt, $data); + $realquery = $this->executeEmulateQuery($stmt, $data); $this->last_query = $realquery; $result = $this->simpleQuery($realquery); if (DB::isError($result) || $result === DB_OK) { Index: php4/pear/DB/sybase.php diff -u php4/pear/DB/sybase.php:1.9 php4/pear/DB/sybase.php:1.10 --- php4/pear/DB/sybase.php:1.9 Thu Dec 7 18:30:43 2000 +++ php4/pear/DB/sybase.php Sat Dec 9 17:32:16 2000 @@ -16,7 +16,7 @@ // | Authors: Sterling Hughes <sterling@php.net> | // +----------------------------------------------------------------------+ // -// $Id: sybase.php,v 1.9 2000/12/08 02:30:43 ssb Exp $ +// $Id: sybase.php,v 1.10 2000/12/10 01:32:16 ssb Exp $ // // Database independent query interface definition for PHP's Sybase // extension. @@ -65,18 +65,6 @@ return @sybase_close($this->connection); } - function &query($stmt) - { - $this->last_query = $stmt; - $result = @sybase_query($stmt, $this->connection); - if (!$result) { - return $this->raiseError(); - } - // Determine which queries that should return data, and which - // should return an error code only. - return DB::isManip($stmt) ? DB_OK : new DB_result($this, $result); - } - function simpleQuery($stmt) { $this->last_query = $stmt; @@ -159,7 +147,7 @@ function execute($stmt, $data = false) { - $realquery = $this->execute_emulate_query($stmt, $data); + $realquery = $this->executeEmulateQuery($stmt, $data); $this->last_query = $realquery; $result = @sybase_query($realquery, $this->connection); if (!$result) {