original_string: public function query($sql, &$values=array())
  	{
  		if ($this->logging)
  		{
  			if ($values) {
  				$this->logger->addInfo($sql, $values);
  			} else {
  				$this->logger->addInfo($sql);
  			}
  		}
  
  		$this->lastQuery = $sql;
  		try {
  			if (!($sth = $this->connection->prepare($sql)))
  				throw new DatabaseException($this);
  		} catch (PDOException $e) {
  			throw new DatabaseException($this);
  		}
  
  		$sth->setFetchMode(PDO::FETCH_ASSOC);
  
  		try {
  			if (!$sth->execute($values))
  				throw new DatabaseException($this);
  		} catch (PDOException $e) {
  			throw new DatabaseException($e);
  		}
  		return $sth;
  	}
code: public function query($sql, &$values=array())
  	{
  		if ($this->logging)
  		{
  			if ($values) {
  				$this->logger->addInfo($sql, $values);
  			} else {
  				$this->logger->addInfo($sql);
  			}
  		}
  
  		$this->lastQuery = $sql;
  		try {
  			if (!($sth = $this->connection->prepare($sql)))
  				throw new DatabaseException($this);
  		} catch (PDOException $e) {
  			throw new DatabaseException($this);
  		}
  
  		$sth->setFetchMode(PDO::FETCH_ASSOC);
  
  		try {
  			if (!$sth->execute($values))
  				throw new DatabaseException($this);
  		} catch (PDOException $e) {
  			throw new DatabaseException($e);
  		}
  		return $sth;
  	}
code_tokens: public function query ( $ sql , & $ values = array ( ) ) { if ( $ this -> logging ) { if ( $ values ) { $ this -> logger -> addInfo ( $ sql , $ values ) ; } else { $ this -> logger -> addInfo ( $ sql ) ; } } $ this -> lastQuery = $ sql ; try { if ( ! ( $ sth = $ this -> connection -> prepare ( $ sql ) ) ) throw new DatabaseException ( $ this ) ; } catch ( PDOException $ e ) { throw new DatabaseException ( $ this ) ; } $ sth -> setFetchMode ( PDO :: FETCH_ASSOC ) ; try { if ( ! $ sth -> execute ( $ values ) ) throw new DatabaseException ( $ this ) ; } catch ( PDOException $ e ) { throw new DatabaseException ( $ e ) ; } return $ sth ; }
docstring: Execute a raw SQL query on the database.
  
  @param string $sql Raw SQL string to execute.
  @param array &$values Optional array of bind values
  @return mixed A result set object
docstring_tokens: Execute a raw SQL query on the database .