public function query($sql, $params = [], $driverParams = [])
{
// what are we doing?
$log = usingLog()->startAction(["run SQL query:", $sql, "/ with params:", $params, "and driver params:", $driverParams]);
try {
// create a prepared statement
//
// we do this so that we can inject the $params into the SQL statement
$stmt = $this->args[0]->prepare($sql, $driverParams);
// execute the prepared statement
$stmt->execute($params);
// all done
$log->endAction();
return $stmt;
} catch (Exception $e) {
throw new E5xx_ActionFailed(__METHOD__, $e->getMessage());
}
}