cvs: pear /MDB2/MDB2/Driver fbsql.php ibase.php mssql.php mysql.php sqlite.php
| From: | Lukas Smith | Date: | Thu, 29 Apr 2004 20:14:16 +0000 |
| Subject: | cvs: pear /MDB2/MDB2/Driver fbsql.php ibase.php mssql.php mysql.php sqlite.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-18972@lists.php.net to get a copy of this message | ||
lsmith Thu Apr 29 16:14:16 2004 EDT
Modified files:
/pear/MDB2/MDB2/Driver sqlite.php mysql.php mssql.php ibase.php
fbsql.php
Log:
affectedRows() now ensures that the last query was a manipulation query
http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/sqlite.php?r1=1.15&r2=1.16&ty=u
Index: pear/MDB2/MDB2/Driver/sqlite.php
diff -u pear/MDB2/MDB2/Driver/sqlite.php:1.15 pear/MDB2/MDB2/Driver/sqlite.php:1.16
--- pear/MDB2/MDB2/Driver/sqlite.php:1.15 Sun Apr 25 06:04:59 2004
+++ pear/MDB2/MDB2/Driver/sqlite.php Thu Apr 29 16:14:16 2004
@@ -43,7 +43,7 @@
// | Author: Lukas Smith <smith@backendmedia.com> |
// +----------------------------------------------------------------------+
//
-// $Id: sqlite.php,v 1.15 2004/04/25 10:04:59 lsmith Exp $
+// $Id: sqlite.php,v 1.16 2004/04/29 20:14:16 lsmith Exp $
//
/**
@@ -486,7 +486,11 @@
*/
function affectedRows()
{
- $affected_rows = @sqlite_changes($this->connection);
+ if (MDB2::isManip($this->last_query)) {
+ $affected_rows = @sqlite_changes($this->connection);
+ } else {
+ $affected_rows = 0;
+ }
if ($affected_rows === false) {
return $this->raiseError(MDB2_ERROR_NEED_MORE_DATA);
}
http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/mysql.php?r1=1.13&r2=1.14&ty=u
Index: pear/MDB2/MDB2/Driver/mysql.php
diff -u pear/MDB2/MDB2/Driver/mysql.php:1.13 pear/MDB2/MDB2/Driver/mysql.php:1.14
--- pear/MDB2/MDB2/Driver/mysql.php:1.13 Sun Apr 25 06:04:59 2004
+++ pear/MDB2/MDB2/Driver/mysql.php Thu Apr 29 16:14:16 2004
@@ -43,7 +43,7 @@
// | Author: Lukas Smith <smith@backendmedia.com> |
// +----------------------------------------------------------------------+
//
-// $Id: mysql.php,v 1.13 2004/04/25 10:04:59 lsmith Exp $
+// $Id: mysql.php,v 1.14 2004/04/29 20:14:16 lsmith Exp $
//
/**
@@ -514,7 +514,11 @@
*/
function affectedRows()
{
- $affected_rows = @mysql_affected_rows($this->connection);
+ if (MDB2::isManip($this->last_query)) {
+ $affected_rows = @mysql_affected_rows($this->connection);
+ } else {
+ $affected_rows = 0;
+ }
if ($affected_rows === false) {
return $this->raiseError(MDB2_ERROR_NEED_MORE_DATA);
}
http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/mssql.php?r1=1.12&r2=1.13&ty=u
Index: pear/MDB2/MDB2/Driver/mssql.php
diff -u pear/MDB2/MDB2/Driver/mssql.php:1.12 pear/MDB2/MDB2/Driver/mssql.php:1.13
--- pear/MDB2/MDB2/Driver/mssql.php:1.12 Sun Apr 25 06:04:59 2004
+++ pear/MDB2/MDB2/Driver/mssql.php Thu Apr 29 16:14:16 2004
@@ -43,7 +43,7 @@
// | Author: Frank M. Kromann <frank@kromann.info> |
// +----------------------------------------------------------------------+
//
-// $Id: mssql.php,v 1.12 2004/04/25 10:04:59 lsmith Exp $
+// $Id: mssql.php,v 1.13 2004/04/29 20:14:16 lsmith Exp $
//
/**
@@ -453,7 +453,11 @@
*/
function affectedRows()
{
- $affected_rows = @mssql_affected_rows($this->connection);
+ if (MDB2::isManip($this->last_query)) {
+ $affected_rows = @mssql_affected_rows($this->connection);
+ } else {
+ $affected_rows = 0;
+ }
if ($affected_rows === false) {
return $this->raiseError(MDB2_ERROR_NEED_MORE_DATA);
}
http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/ibase.php?r1=1.23&r2=1.24&ty=u
Index: pear/MDB2/MDB2/Driver/ibase.php
diff -u pear/MDB2/MDB2/Driver/ibase.php:1.23 pear/MDB2/MDB2/Driver/ibase.php:1.24
--- pear/MDB2/MDB2/Driver/ibase.php:1.23 Fri Apr 23 13:06:46 2004
+++ pear/MDB2/MDB2/Driver/ibase.php Thu Apr 29 16:14:16 2004
@@ -43,7 +43,7 @@
// | Author: Lorenzo Alberton <l.alberton@quipo.it> |
// +----------------------------------------------------------------------+
//
-// $Id: ibase.php,v 1.23 2004/04/23 17:06:46 lsmith Exp $
+// $Id: ibase.php,v 1.24 2004/04/29 20:14:16 lsmith Exp $
/**
* MDB2 FireBird/InterBase driver
@@ -543,7 +543,11 @@
function affectedRows()
{
if (function_exists('ibase_affected_rows')) { //PHP5 only
- $affected_rows = @ibase_affected_rows($this->connection);
+ if (MDB2::isManip($this->last_query)) {
+ $affected_rows = @ibase_affected_rows($this->connection);
+ } else {
+ $affected_rows = 0;
+ }
if ($affected_rows === false) {
return $this->raiseError(MDB2_ERROR_NEED_MORE_DATA);
}
http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/fbsql.php?r1=1.11&r2=1.12&ty=u
Index: pear/MDB2/MDB2/Driver/fbsql.php
diff -u pear/MDB2/MDB2/Driver/fbsql.php:1.11 pear/MDB2/MDB2/Driver/fbsql.php:1.12
--- pear/MDB2/MDB2/Driver/fbsql.php:1.11 Sun Apr 25 06:04:59 2004
+++ pear/MDB2/MDB2/Driver/fbsql.php Thu Apr 29 16:14:16 2004
@@ -43,7 +43,7 @@
// | Author: Lukas Smith <smith@backendmedia.com> |
// +----------------------------------------------------------------------+
//
-// $Id: fbsql.php,v 1.11 2004/04/25 10:04:59 lsmith Exp $
+// $Id: fbsql.php,v 1.12 2004/04/29 20:14:16 lsmith Exp $
//
/**
@@ -428,7 +428,11 @@
*/
function affectedRows()
{
- $affected_rows = @fbsql_affected_rows($this->connection);
+ if (MDB2::isManip($this->last_query)) {
+ $affected_rows = @fbsql_affected_rows($this->connection);
+ } else {
+ $affected_rows = 0;
+ }
if ($affected_rows === false) {
return $this->raiseError(MDB2_ERROR_NEED_MORE_DATA);
}