cvs: pear /MDB/MDB oci8.php
| From: | Lukas Smith | Date: | Sun, 02 Feb 2003 18:46:53 +0000 |
| Subject: | cvs: pear /MDB/MDB oci8.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-8691@lists.php.net to get a copy of this message | ||
lsmith Sun Feb 2 13:46:53 2003 EDT
Modified files:
/pear/MDB/MDB oci8.php
Log:
set correct decimal seperator at connect time (thx to Michael Bretterklieber for pointing this
out)
Index: pear/MDB/MDB/oci8.php
diff -u pear/MDB/MDB/oci8.php:1.8 pear/MDB/MDB/oci8.php:1.9
--- pear/MDB/MDB/oci8.php:1.8 Sun Feb 2 08:45:05 2003
+++ pear/MDB/MDB/oci8.php Sun Feb 2 13:46:53 2003
@@ -42,7 +42,7 @@
// | Author: Lukas Smith <smith@backendmedia.com> |
// +----------------------------------------------------------------------+
-// $Id: oci8.php,v 1.8 2003/02/02 13:45:05 lsmith Exp $
+// $Id: oci8.php,v 1.9 2003/02/02 18:46:53 lsmith Exp $
if (!defined('MDB_OCI8_INCLUDED')) {
define('MDB_OCI8_INCLUDED', 1);
@@ -315,6 +315,11 @@
$this->_close();
return($doquery);
}
+ if (MDB::isError($doquery = $this->_doQuery("ALTER SESSION SET
NLS_NUMERIC_CHARACTERS='. '"))) {
+ $this->_close();
+ return($doquery);
+ }
+
$this->connected_user = $user;
$this->connected_password = $password;
$this->opened_persistent = $persistent;
@@ -857,9 +862,9 @@
case MDB_TYPE_BOOLEAN:
return(strcmp($value, 'Y') ? 0 : 1);
case MDB_TYPE_DECIMAL:
- return(str_replace(',', '.', $value));
+ return($value);
case MDB_TYPE_FLOAT:
- return(doubleval(str_replace(',', '.', $value)));
+ return(doubleval($value));
case MDB_TYPE_DATE:
return(substr($value, 0, strlen('YYYY-MM-DD')));
case MDB_TYPE_TIME: