public function limit($limit, $limit2 = null)
    {
        if (!is_null($limit2)) 
        {
            $this->offset = (int) $limit;
            $this->limit = (int) $limit2;
        } else {
            $this->limit = (int) $limit;
        }

        return $this;
    }
public function limit($limit, $limit2 = null)
    {
        if (!is_null($limit2)) 
        {
            $this->offset = (int) $limit;
            $this->limit = (int) $limit2;
        } else {
            $this->limit = (int) $limit;
        }

        return $this;
    }
public function limit ( $ limit , $ limit2 = null ) { if ( ! is_null ( $ limit2 ) ) { $ this -> offset = ( int ) $ limit ; $ this -> limit = ( int ) $ limit2 ; } else { $ this -> limit = ( int ) $ limit ; } return $ this ; }
Set the query limit

// limit(<limit>)
->limit(20)

// limit(<offset>, <limit>)
->limit(60, 20)

@param int           $limit
@param int           $limit2
@return self The current query builder.
Set the query limit