Gdn_SQLDriver::limit PHP Method

limit() public method

Sets the limit (and offset optionally) for the query.
public limit ( integer $Limit, integer $Offset = false ) : Gdn_SQLDriver
$Limit integer The number of records to limit the query to.
$Offset integer The offset where the query results should begin.
return Gdn_SQLDriver $this
    public function limit($Limit, $Offset = false)
    {
        // SQL chokes on ints over 2^31
        if ($Limit > self::MAX_SIGNED_INT) {
            throw new Exception(t('Invalid limit.'), 400);
        }
        $this->_Limit = $Limit;
        if ($Offset !== false) {
            $this->offset($Offset);
        }
        return $this;
    }