From 28f62352be8de7e68b3baf9b665a7e7861590b75 Mon Sep 17 00:00:00 2001 From: Anton Berezhnoj Date: Tue, 13 Jan 2015 13:42:40 +0200 Subject: [PATCH] Fix start transaction in mysqli driver Function mysqli_begin_transaction exists from php version 5.5.0 --- lib/DbSimple/Mysqli.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/DbSimple/Mysqli.php b/lib/DbSimple/Mysqli.php index 6d100e6..bd58fd8 100644 --- a/lib/DbSimple/Mysqli.php +++ b/lib/DbSimple/Mysqli.php @@ -116,7 +116,11 @@ protected function _performGetPlaceholderIgnoreRe() protected function _performTransaction($parameters=null) { - return mysqli_begin_transaction($this->link); + if( function_exists('mysqli_begin_transaction') ) { + return mysqli_begin_transaction($this->link); + } else { + return mysqli_autocommit($this->link, false); + } }