library/Garp/Model/Db.php
public function createSelect($where = null, $order = null, $count = null, $offset = null) {
        $select = $this->select();

        if ($where !== null) {
            $this->_where($select, $where);
        }

        if ($order !== null) {
            $this->_order($select, $order);
        }

        if ($count !== null || $offset !== null) {
            $select->limit($count, $offset);
        }
        return $select;
    }
public function createSelect($where = null, $order = null, $count = null, $offset = null) {
        $select = $this->select();

        if ($where !== null) {
            $this->_where($select, $where);
        }

        if ($order !== null) {
            $this->_order($select, $order);
        }

        if ($count !== null || $offset !== null) {
            $select->limit($count, $offset);
        }
        return $select;
    }
public function createSelect ( $ where = null , $ order = null , $ count = null , $ offset = null ) { $ select = $ this -> select ( ) ; if ( $ where !== null ) { $ this -> _where ( $ select , $ where ) ; } if ( $ order !== null ) { $ this -> _order ( $ select , $ order ) ; } if ( $ count !== null || $ offset !== null ) { $ select -> limit ( $ count , $ offset ) ; } return $ select ; }
Convenience method for creating SELECT objects

@param string|array|Zend_Db_Table_Select $where  OPTIONAL An SQL WHERE clause or
Zend_Db_Table_Select object.
@param string|array                      $order  OPTIONAL An SQL ORDER clause.
@param int                               $count  OPTIONAL An SQL LIMIT count.
@param int                               $offset OPTIONAL An SQL LIMIT offset.
@return Zend_Db_Table_Select
Convenience method for creating SELECT objects