From 5a3e8fef3777db3d5e10db1d7ff9d87526fc4651 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 10 Nov 2003 14:31:55 +0000 Subject: [PATCH] Ajout paramatre do pour gerer l'imbrication de plusieures transactions --- htdocs/lib/mysql.lib.php | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/htdocs/lib/mysql.lib.php b/htdocs/lib/mysql.lib.php index b4516a832b2..72e4046a8ef 100644 --- a/htdocs/lib/mysql.lib.php +++ b/htdocs/lib/mysql.lib.php @@ -109,19 +109,28 @@ class DoliDb { return $this->ret; } - Function begin() + Function begin($do=1) { - return $this->query("BEGIN"); + if ($do) + { + return $this->query("BEGIN"); + } } - Function commit() + Function commit($do=1) { - return $this->query("COMMIT"); + if ($do) + { + return $this->query("COMMIT"); + } } - Function rollback() + Function rollback($do=1) { - return $this->query("ROLLBACK"); + if ($do) + { + return $this->query("ROLLBACK"); + } } Function query($query, $limit="", $offset="")