cvs: pear /Structures_DataGrid/DataGrid/DataSource DBQuery.php MDB2.php
| From: | Mark Wiesemann | Date: | Fri, 24 Mar 2006 20:57:54 +0000 |
| Subject: | cvs: pear /Structures_DataGrid/DataGrid/DataSource DBQuery.php MDB2.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-39304@lists.php.net to get a copy of this message | ||
wiesemann Fri Mar 24 20:57:54 2006 UTC
Modified files:
/pear/Structures_DataGrid/DataGrid/DataSource DBQuery.php MDB2.php
Log:
- small WS fixes
- rename 'connection' array key to 'dbc'
==> fewer keystrokes for lazy people *g*
http://cvs.php.net/viewcvs.cgi/pear/Structures_DataGrid/DataGrid/DataSource/DBQuery.php?r1=1.6&r2=1.7&diff_format=u
Index: pear/Structures_DataGrid/DataGrid/DataSource/DBQuery.php
diff -u pear/Structures_DataGrid/DataGrid/DataSource/DBQuery.php:1.6
pear/Structures_DataGrid/DataGrid/DataSource/DBQuery.php:1.7
--- pear/Structures_DataGrid/DataGrid/DataSource/DBQuery.php:1.6 Thu Mar 16 12:54:02 2006
+++ pear/Structures_DataGrid/DataGrid/DataSource/DBQuery.php Fri Mar 24 20:57:54 2006
@@ -17,7 +17,7 @@
// | Mark Wiesemann <wiesemann@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: DBQuery.php,v 1.6 2006/03/16 12:54:02 olivierg Exp $
+// $Id: DBQuery.php,v 1.7 2006/03/24 20:57:54 wiesemann Exp $
require_once 'DB.php';
require_once 'Structures/DataGrid/DataSource.php';
@@ -28,7 +28,7 @@
*
* This class is a data source driver for the PEAR::DB object
*
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
* @author Andrew S. Nagy <asnagy@php.net>
* @author Mark Wiesemann <wiesemann@php.net>
* @access public
@@ -84,7 +84,7 @@
* Bind
*
* @param string $query The query string
- * @param mixed $options array('connection' => [PEAR::DB object])
+ * @param mixed $options array('dbc' => [PEAR::DB object])
* or
* array('dsn' => [PEAR::DB dsn string])
* @access public
@@ -96,9 +96,9 @@
$this->setOptions($options);
}
- if (isset($this->_options['connection']) &&
- DB::isConnection($this->_options['connection'])) {
- $this->_db = &$this->_options['connection'];
+ if (isset($this->_options['dbc']) &&
+ DB::isConnection($this->_options['dbc'])) {
+ $this->_db = &$this->_options['dbc'];
} elseif (isset($this->_options['dsn'])) {
$dbOptions = array();
if (array_key_exists('db_options', $options)) {
@@ -107,7 +107,7 @@
$this->_db =& DB::connect($this->_options['dsn'], $dbOptions);
if (PEAR::isError($this->_db)) {
return PEAR::raiseError('Could not create connection: ' .
- $this->_db->getMessage());
+ $this->_db->getMessage());
}
} else {
return PEAR::raiseError('No DB object or dsn string specified');
http://cvs.php.net/viewcvs.cgi/pear/Structures_DataGrid/DataGrid/DataSource/MDB2.php?r1=1.3&r2=1.4&diff_format=u
Index: pear/Structures_DataGrid/DataGrid/DataSource/MDB2.php
diff -u pear/Structures_DataGrid/DataGrid/DataSource/MDB2.php:1.3
pear/Structures_DataGrid/DataGrid/DataSource/MDB2.php:1.4
--- pear/Structures_DataGrid/DataGrid/DataSource/MDB2.php:1.3 Thu Mar 16 12:54:02 2006
+++ pear/Structures_DataGrid/DataGrid/DataSource/MDB2.php Fri Mar 24 20:57:54 2006
@@ -17,7 +17,7 @@
// | Mark Wiesemann <wiesemann@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: MDB2.php,v 1.3 2006/03/16 12:54:02 olivierg Exp $
+// $Id: MDB2.php,v 1.4 2006/03/24 20:57:54 wiesemann Exp $
require_once 'MDB2.php';
require_once 'Structures/DataGrid/DataSource.php';
@@ -28,7 +28,7 @@
*
* This class is a data source driver for the PEAR::MDB2 object
*
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
* @author Andrew S. Nagy <asnagy@php.net>
* @author Mark Wiesemann <wiesemann@php.net>
* @access public
@@ -84,7 +84,7 @@
* Bind
*
* @param string $query The query string
- * @param mixed $options array('connection' => [PEAR::MDB2 object])
+ * @param mixed $options array('dbc' => [PEAR::MDB2 object])
* or
* array('dsn' => [PEAR::MDB2 dsn string])
* @access public
@@ -96,9 +96,9 @@
$this->setOptions($options);
}
- if (isset($this->_options['connection']) &&
- MDB2::isConnection($this->_options['connection'])) {
- $this->_db = &$this->_options['connection'];
+ if (isset($this->_options['dbc']) &&
+ MDB2::isConnection($this->_options['dbc'])) {
+ $this->_db = &$this->_options['dbc'];
} elseif (isset($this->_options['dsn'])) {
$dbOptions = array();
if (array_key_exists('db_options', $options)) {
@@ -107,7 +107,7 @@
$this->_db =& MDB2::factory($this->_options['dsn'], $dbOptions);
if (PEAR::isError($this->_db)) {
return PEAR::raiseError('Could not create connection: ' .
- $this->_db->getMessage());
+ $this->_db->getMessage());
}
} else {
return PEAR::raiseError('No MDB2 object or dsn string specified');