public function limit($limit)
    {
        if(!empty($limit))
            $this->selectParams[self::LIMIT] = $limit;
        else
            unset($this->selectParams[self::LIMIT]);
        return $this;
    }
public function limit($limit)
    {
        if(!empty($limit))
            $this->selectParams[self::LIMIT] = $limit;
        else
            unset($this->selectParams[self::LIMIT]);
        return $this;
    }
public function limit ( $ limit ) { if ( ! empty ( $ limit ) ) $ this -> selectParams [ self :: LIMIT ] = $ limit ; else unset ( $ this -> selectParams [ self :: LIMIT ] ) ; return $ this ; }
Sets the LIMIT clause for the query.

If a NULL value is specified, the limit is removed from the query.

@param string $limit The limit to use. If NULL, the limit is cleared.

@return this
Sets the LIMIT clause for the query .