original_string: 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
              )
          );
      }
code: 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
              )
          );
      }
code_tokens: 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 ) ) ; }
docstring: 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.
docstring_tokens: Prepare the base SQL query .