cvs: pear /MDB_QueryTool/QueryTool Query.php
| From: | Lorenzo Alberton | Date: | Mon, 30 Oct 2006 19:26:01 +0000 |
| Subject: | cvs: pear /MDB_QueryTool/QueryTool Query.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-42895@lists.php.net to get a copy of this message | ||
quipo Mon Oct 30 19:26:01 2006 UTC
Modified files:
/pear/MDB_QueryTool/QueryTool Query.php
Log:
- phpdoc fixes
- removed cast to int to nextId() call
http://cvs.php.net/viewvc.cgi/pear/MDB_QueryTool/QueryTool/Query.php?r1=1.59&r2=1.60&diff_format=u
Index: pear/MDB_QueryTool/QueryTool/Query.php
diff -u pear/MDB_QueryTool/QueryTool/Query.php:1.59 pear/MDB_QueryTool/QueryTool/Query.php:1.60
--- pear/MDB_QueryTool/QueryTool/Query.php:1.59 Mon Oct 30 19:22:37 2006
+++ pear/MDB_QueryTool/QueryTool/Query.php Mon Oct 30 19:26:01 2006
@@ -32,7 +32,7 @@
* @author Lorenzo Alberton <l dot alberton at quipo dot it>
* @copyright 2004-2006 Lorenzo Alberton
* @license http://www.debian.org/misc/bsd.license BSD
License (3 Clause)
- * @version CVS: $Id: Query.php,v 1.59 2006/10/30 19:22:37 quipo Exp $
+ * @version CVS: $Id: Query.php,v 1.60 2006/10/30 19:26:01 quipo Exp $
* @link http://pear.php.net/package/MDB_QueryTool
*/
@@ -73,7 +73,7 @@
var $sequenceName = null;
/**
- * @var object the db-object, a PEAR::Mdb-object instance
+ * @var object the db-object, a PEAR::MDB[2] object instance
*/
var $db = null;
@@ -256,7 +256,7 @@
// {{{ MDB_QueryTool_Query()
/**
- * @param mixed $dsn DSN string, DSN array or MDB object
+ * @param mixed $dsn DSN string, DSN array or MDB[2] object
* @param array $options
* @param integer $MDBversion 1=MDB, 2=MDB2
* @access public
@@ -298,7 +298,7 @@
/**
* use this method if you want to connect manually
- * @param mixed $dsn DSN string, DSN array or MDB object
+ * @param mixed $dsn DSN string, DSN array or MDB[2] object
* @param array $options
* @param integer $MDBversion 1=MDB, 2=MDB2
*/
@@ -706,8 +706,9 @@
if ($this->primaryCol) {
// do only use the sequence if a primary column is given
// otherwise the data are written as given
- $func = ($this->_MDBversion == 2) ? 'nextID' : 'nextId';
- $id = (int)$this->db->$func($this->sequenceName);
+ $nextid_func = ($this->_MDBversion == 2) ? 'nextID' :
'nextId';
+ //$id = (int)$this->db->$nextid_func($this->sequenceName);
+ $id = $this->db->$nextid_func($this->sequenceName);
$newData[$this->primaryCol] = $id;
} else {
// if no primary col is given return true on success
@@ -1528,7 +1529,7 @@
}
foreach ($newData as $colName => $x) {
if (!isset($meta[$colName])) {
- $this->_errorLog("$method, column {$this->table}.$colName doesnt exist,
value was removed before '$method'",__LINE__);
+ $this->_errorLog("$method, column {$this->table}.$colName doesn't
exist, value was removed before '$method'", __LINE__);
unset($newData[$colName]);
} else {
// if the current column exists, check the length too, not to write content that is
too long