From 4a244c109126fcec5ef43b185225d094e166e29a Mon Sep 17 00:00:00 2001 From: xue <> Date: Mon, 6 Mar 2006 05:03:44 +0000 Subject: small fixes to prepare for beta release --- framework/DataAccess/TAdodbProvider.php | 47 ++++++++++++++++----------------- 1 file changed, 23 insertions(+), 24 deletions(-) (limited to 'framework/DataAccess/TAdodbProvider.php') diff --git a/framework/DataAccess/TAdodbProvider.php b/framework/DataAccess/TAdodbProvider.php index d4b6cf30..65e336a9 100644 --- a/framework/DataAccess/TAdodbProvider.php +++ b/framework/DataAccess/TAdodbProvider.php @@ -1,11 +1,10 @@ * $provider = new TAdodbProvider; @@ -100,7 +99,7 @@ class TAdodbProvider extends TDatabaseProvider public function setFetchMode($value) { $value = strtolower($value); - if($value===self::FETCH_ASSOCIATIVE || $value===self::FETCH_NUMERIC + if($value===self::FETCH_ASSOCIATIVE || $value===self::FETCH_NUMERIC || $value===self::FETCH_BOTH) $this->_fetchMode=$value; else @@ -163,24 +162,24 @@ class TAdodbConnection extends TDbConnection return call_user_func_array(array($this->_connection,$method),$params); } - /** - * Cleanup work before serializing. - * This is a PHP defined magic method. - * @return array the names of instance-variables to serialize. - */ - public function __sleep() - { - $this->close(); - return array_keys(get_object_vars($this)); - } - - /** - * This method will be automatically called when unserialization happens. - * This is a PHP defined magic method. - */ - public function __wakeup() - { - } + /** + * Cleanup work before serializing. + * This is a PHP defined magic method. + * @return array the names of instance-variables to serialize. + */ + public function __sleep() + { + $this->close(); + return array_keys(get_object_vars($this)); + } + + /** + * This method will be automatically called when unserialization happens. + * This is a PHP defined magic method. + */ + public function __wakeup() + { + } public function getIsClosed() @@ -265,7 +264,7 @@ class TAdodbConnection extends TDbConnection $this->initCacheDir(); } return $this->_connection->IsConnected(); - } + } /** * Complete the database connection. @@ -285,7 +284,7 @@ class TAdodbConnection extends TDbConnection $this->_connection->Connect($provider->getHost(), $provider->getUsername(),$provider->getPassword(), $provider->getDatabase()); - } + } } /** @@ -329,7 +328,7 @@ class TAdodbConnection extends TDbConnection /** * @param string quote a string to be sent to the database. - * @param boolean if true it ensure that the variable is not quoted twice, + * @param boolean if true it ensure that the variable is not quoted twice, * once by quote and once by the magic_quotes_gpc. * @return string database specified quoted string */ -- cgit v1.2.3