cvs: pear /DB/DB mysql.php
| From: | Martin Jansen | Date: | Thu, 15 Aug 2002 10:22:37 +0000 |
| Subject: | cvs: pear /DB/DB mysql.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-5754@lists.php.net to get a copy of this message | ||
mj Thu Aug 15 06:22:37 2002 EDT
Modified files:
/pear/DB/DB mysql.php
Log:
* Discard $from when using UPDATE or DELETE.
Patch by: Roman Neuhauser
Index: pear/DB/DB/mysql.php
diff -u pear/DB/DB/mysql.php:1.8 pear/DB/DB/mysql.php:1.9
--- pear/DB/DB/mysql.php:1.8 Wed Aug 14 04:55:15 2002
+++ pear/DB/DB/mysql.php Thu Aug 15 06:22:37 2002
@@ -16,7 +16,7 @@
// | Author: Stig Bakken <ssb@fast.no> |
// +----------------------------------------------------------------------+
//
-// $Id: mysql.php,v 1.8 2002/08/14 08:55:15 sander Exp $
+// $Id: mysql.php,v 1.9 2002/08/15 10:22:37 mj Exp $
//
// Database independent query interface definition for PHP's MySQL
// extension.
@@ -697,7 +697,11 @@
function modifyLimitQuery($query, $from, $count)
{
- return $query . " LIMIT $from, $count";
+ if (DB::isManip($query)) {
+ return $query . " LIMIT $count";
+ } else {
+ return $query . " LIMIT $from, $count";
+ }
}
// }}}