cvs: pear /MDB mysql.php

From: Date: Thu, 15 Aug 2002 11:09:42 +0000
Subject: cvs: pear /MDB mysql.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-5757@lists.php.net to get a copy of this message
lsmith Thu Aug 15 07:09:42 2002 EDT Modified files: /pear/MDB mysql.php Log: limit fix for manipulation queries Index: pear/MDB/mysql.php diff -u pear/MDB/mysql.php:1.39 pear/MDB/mysql.php:1.40 --- pear/MDB/mysql.php:1.39 Mon Aug 12 08:37:36 2002 +++ pear/MDB/mysql.php Thu Aug 15 07:09:41 2002 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@dybnet.de> | // +----------------------------------------------------------------------+ // -// $Id: mysql.php,v 1.39 2002/08/12 12:37:36 lsmith Exp $ +// $Id: mysql.php,v 1.40 2002/08/15 11:09:41 lsmith Exp $ // if (!defined('MDB_MYSQL_INCLUDED')) { @@ -414,13 +414,14 @@ if (MDB::isError($result)) { return $result; } - - if (!$ismanip && $limit > 0 && - substr(strtolower(ltrim($query)), - 0, 6) == 'select') - { - $query .= " LIMIT $first,$limit"; + if($limit > 0) { + if ($ismanip) { + $query .= " LIMIT $limit"; + } else { + $query .= " LIMIT $first,$limit"; + } } + if (mysql_select_db($this->database_name, $this->connection) && ($result = mysql_query($query, $this->connection))) {

« previous php.pear.cvs (#5757) next »