public function query($strQuery='')
	{
		if (!empty($strQuery))
		{
			$this->strQuery = trim($strQuery);
		}

		// Make sure there is a query string
		if ($this->strQuery == '')
		{
			throw new \Exception('Empty query string');
		}

		// Execute the query
		$this->statement = $this->resConnection->executeQuery($this->strQuery);

		// No result set available
		if ($this->statement->columnCount() < 1)
		{
			return $this;
		}

		// Instantiate a result object
		return new Result($this->statement, $this->strQuery);
	}
public function query($strQuery='')
	{
		if (!empty($strQuery))
		{
			$this->strQuery = trim($strQuery);
		}

		
		if ($this->strQuery == '')
		{
			throw new \Exception('Empty query string');
		}

		
		$this->statement = $this->resConnection->executeQuery($this->strQuery);

		
		if ($this->statement->columnCount() < 1)
		{
			return $this;
		}

		
		return new Result($this->statement, $this->strQuery);
	}
public function query ( $ strQuery = '' ) { if ( ! empty ( $ strQuery ) ) { $ this -> strQuery = trim ( $ strQuery ) ; } // Make sure there is a query string if ( $ this -> strQuery == '' ) { throw new \ Exception ( 'Empty query string' ) ; } // Execute the query $ this -> statement = $ this -> resConnection -> executeQuery ( $ this -> strQuery ) ; // No result set available if ( $ this -> statement -> columnCount ( ) < 1 ) { return $ this ; } // Instantiate a result object return new Result ( $ this -> statement , $ this -> strQuery ) ; }
Directly send a query string to the database

@param string $strQuery The query string

@return Result|Statement The result object or the statement object if there is no result set

@throws \Exception If the query string is empty
Directly send a query string to the database