/** * on DBs that support it, switch to transaction mode and begin a transaction * you'll need to ensure you call commit_sql() or your changes *will* be lost. * * this is _very_ useful for massive updates */ public function begin_sql() { if (!parent::begin_sql()) { return false; } $sql = "BEGIN ISOLATION LEVEL READ COMMITTED"; $this->query_start($sql, NULL, SQL_QUERY_AUX); $result = pg_query($this->pgsql, $sql); $this->query_end($result); pg_free_result($result); return true; }
public function begin_sql() { if (!parent::begin_sql()) { return false; } $this->adodb->BeginTrans(); return true; }
/** * on DBs that support it, switch to transaction mode and begin a transaction * you'll need to ensure you call commit_sql() or your changes *will* be lost. * * this is _very_ useful for massive updates */ public function begin_sql() { if (!parent::begin_sql()) { return false; } $sql = "SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED"; $this->query_start($sql, NULL, SQL_QUERY_AUX); $result = $this->mysqli->query($sql); $this->query_end($result); $sql = "BEGIN"; $this->query_start($sql, NULL, SQL_QUERY_AUX); $result = $this->mysqli->query($sql); $this->query_end($result); return true; }
public function begin_sql() { if (!parent::begin_sql()) { return false; } $this->query_start('', NULL, SQL_QUERY_AUX); $result = true; try { $this->pdb->beginTransaction(); } catch (PDOException $ex) { $this->lastError = $ex->getMessage(); $result = false; } $this->query_end($result); return $result; }
/** * on DBs that support it, switch to transaction mode and begin a transaction * you'll need to ensure you call commit_sql() or your changes *will* be lost. * * this is _very_ useful for massive updates */ public function begin_sql() { if (!parent::begin_sql()) { return false; } return true; $sql = "BEGIN"; $this->query_start($sql, NULL, SQL_QUERY_AUX); $stmt = $this->parse_query($sql); $result = oci_execute($stmt); $this->query_end($result, $stmt); oci_free_statement($stmt); return true; }