From aeaaeb67d83c55f19db4bcbb80bfcef7a68b746d Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 18 Dec 2017 17:30:01 +0800 Subject: [PATCH] * fix bug for cache. --- lib/base/dao/dao.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/base/dao/dao.class.php b/lib/base/dao/dao.class.php index c63fd0a09d..de4318b9f7 100644 --- a/lib/base/dao/dao.class.php +++ b/lib/base/dao/dao.class.php @@ -782,7 +782,7 @@ class baseDAO { $sql = $this->processSQL(); $table = $this->table; - $key = 'fetch-' . md5($sql); + $key = 'fetch-' . md5($sql . $field); if(isset(dao::$cache[$table][$key])) { if(empty($field)) return $this->getRow(dao::$cache[$table][$key]); @@ -800,7 +800,7 @@ class baseDAO $this->setFields($field); $result = $this->query()->fetch(PDO::FETCH_OBJ); - dao::$cache[$table][$key] = getRow($result); + dao::$cache[$table][$key] = $this->getRow($result); return $result ? $result->$field : ''; }