protected function _baseSql($mailbox, $join = null)
    {
        $sql = sprintf('FROM %s d', self::BASE_TABLE);

        if (!is_null($join)) {
            $sql .= sprintf(' INNER JOIN %s t ON d.messageid = t.messageid', $join);
        }

        return array(
            $sql . ' WHERE d.hostspec = ? AND d.port = ? AND d.username = ? AND d.mailbox = ?',
            array(
                $this->_params['hostspec'],
                $this->_params['port'],
                $this->_params['username'],
                $mailbox
            )
        );
    }
protected function _baseSql($mailbox, $join = null)
    {
        $sql = sprintf('FROM %s d', self::BASE_TABLE);

        if (!is_null($join)) {
            $sql .= sprintf(' INNER JOIN %s t ON d.messageid = t.messageid', $join);
        }

        return array(
            $sql . ' WHERE d.hostspec = ? AND d.port = ? AND d.username = ? AND d.mailbox = ?',
            array(
                $this->_params['hostspec'],
                $this->_params['port'],
                $this->_params['username'],
                $mailbox
            )
        );
    }
protected function _baseSql ( $ mailbox , $ join = null ) { $ sql = sprintf ( 'FROM %s d' , self :: BASE_TABLE ) ; if ( ! is_null ( $ join ) ) { $ sql .= sprintf ( ' INNER JOIN %s t ON d.messageid = t.messageid' , $ join ) ; } return array ( $ sql . ' WHERE d.hostspec = ? AND d.port = ? AND d.username = ? AND d.mailbox = ?' , array ( $ this -> _params [ 'hostspec' ] , $ this -> _params [ 'port' ] , $ this -> _params [ 'username' ] , $ mailbox ) ) ; }
Prepare the base SQL query.

@param string $mailbox  The mailbox.
@param string $join     The table to join with the base table.

@return array  SQL query and bound parameters.
Prepare the base SQL query .