From 43b3459c3423bdb05cd63dbf0e18218077c8fa6a Mon Sep 17 00:00:00 2001 From: fzh369 Date: Thu, 21 Dec 2017 15:02:18 +0800 Subject: [PATCH] Update db.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit public static function autocommit($mode = false) { //self::$links[self::$link_name]['conn'] = self::init_mysql(); self::init_mysql(); //上行这个写法是错的, 因为int_mysql没有返回, 所以会一直是Null. --- core/db.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/db.php b/core/db.php index 7537b69..2dd42b5 100644 --- a/core/db.php +++ b/core/db.php @@ -155,7 +155,8 @@ protected static function _get_rsid($rsid = '') public static function autocommit($mode = false) { - self::$links[self::$link_name]['conn'] = self::init_mysql(); + //self::$links[self::$link_name]['conn'] = self::init_mysql(); + self::init_mysql(); //上行这个写法是错的, 因为int_mysql没有返回, 所以会一直是Null. // $int = $mode ? 1 : 0; // return @mysqli_query(self::$links[self::$link_name]['conn'], "SET autocommit={$int}"); return mysqli_autocommit(self::$links[self::$link_name]['conn'], $mode);