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 (strncasecmp($this->strQuery, 'SELECT', 6) !== 0 && strncasecmp($this->strQuery, 'SHOW', 4) !== 0) {
return $this;
}
// Instantiate a result object
return new \Database\Result($this->statement, $this->strQuery);
}