Re: DB_DataObject::limit() problem

From: Date: Thu, 07 Aug 2003 02:38:48 +0000
Subject: Re: DB_DataObject::limit() problem
References: 1  Groups: php.pear.general php.pear.general 
Request: Send a blank email to pear-general+get-7074@lists.php.net to get a copy of this message
Demian Turner wrote:
Hi all using the latest version of DB_DataObject 1.0.2 my limit queries are failing. The method's logic:
// check input...= 0 or '    ' == error!
if (!is_int($a) && (($b !== null) && !is_int($b))) {
    return DB_DataObject::raiseError("limit: No Valid Arguments", DB_DATAOBJECT_ERROR_INVALIDARGS);
    }
you where probably sending strings to limit..
eg. limit($_POST['form'],10); - I've improved (made more complex :) the test in CVS now.. Regards Alan
evaluates to true and returns an error for what i believe is a valid limit such as 20,10 [LIMIT [offset,]howmany>] SELECT id, username FROM users WHERE id <> 1 LIMIT 20,10 is this a mysql/pgsql compat issue ? cheers Demian


« previous php.pear.general (#7074) next »