cvs: pear /MDB_QueryTool/QueryTool Query.php
| From: | Lorenzo Alberton | Date: | Fri, 12 Mar 2004 14:27:04 +0000 |
| Subject: | cvs: pear /MDB_QueryTool/QueryTool Query.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-17340@lists.php.net to get a copy of this message | ||
quipo Fri Mar 12 09:27:04 2004 EDT
Modified files:
/pear/MDB_QueryTool/QueryTool Query.php
Log:
- add $options to connect()
- cosmetic fixes
http://cvs.php.net/diff.php/pear/MDB_QueryTool/QueryTool/Query.php?r1=1.21&r2=1.22&ty=u
Index: pear/MDB_QueryTool/QueryTool/Query.php
diff -u pear/MDB_QueryTool/QueryTool/Query.php:1.21 pear/MDB_QueryTool/QueryTool/Query.php:1.22
--- pear/MDB_QueryTool/QueryTool/Query.php:1.21 Fri Mar 12 08:15:14 2004
+++ pear/MDB_QueryTool/QueryTool/Query.php Fri Mar 12 09:27:03 2004
@@ -15,7 +15,7 @@
// | Author: Lorenzo Alberton <l.alberton at quipo.it> |
// +----------------------------------------------------------------------+
//
-// $Id: Query.php,v 1.21 2004/03/12 13:15:14 quipo Exp $
+// $Id: Query.php,v 1.22 2004/03/12 14:27:03 quipo Exp $
//
// This is just a port of DB_QueryTool, originally written by
// Wolfram Kriesing and Paolo Panto, vision:produktion <wk@visionp.de>
@@ -214,7 +214,7 @@
}
if ($autoConnect && $dsn) {
- $this->connect($dsn);
+ $this->connect($dsn, $options);
}
if (is_null($this->sequenceName)) {
@@ -227,9 +227,9 @@
* use this method if you want to connect manually
*
*/
- function connect($dsn)
+ function connect($dsn, $options=array())
{
- $res = $this->db = &MDB::connect($dsn);
+ $res = $this->db = &MDB::connect($dsn, $options);
if (MDB::isError($res)) {
// FIXXME what shall we do here?
$this->_errorLog($res->getUserInfo());
@@ -1256,7 +1256,7 @@
}
$full = false;
- if ($table=='') {
+ if (empty($table)) {
$table = $this->table;
}
// to prevent multiple selects for the same metadata
@@ -1485,7 +1485,7 @@
// that means replace 'table.*' by the i.e. 'table.id AS _table_id'
// or if it is the table of this class replace 'table.id AS id'
if (in_array('', $selectAllFromTables)) {
- $allCols = '';
+ $allCols = array();
foreach ($cols as $aTable) {
$allCols[] = implode(',', $aTable);
}