function query($query) { // Extract back quotes $query = str_replace("`", "", $query); // Handle limits preg_match("/LIMIT 0,[\\s]*([\\d]+)/i", $query, $matches); $this->nextLimit = @$matches[1]; $query = preg_replace("/(LIMIT 0,[\\s]*[\\d]+)/i", "", $query); $ret = ingres_query($query, $this->link); // Simulate autocommit because ingres_autocommit() is unavailable if ($ret && preg_match("/^(INSERT|UPDATE|DELETE)/i", $query)) { ingres_commit($this->link); } return $ret; }
function commit() { ingres_commit($this->Connection); }