* baseDAO: fix error can't set cache for the updated table.

This commit is contained in:
liugang
2024-05-24 16:18:09 +08:00
committed by caoyanyi
parent 9ce05b422a
commit 3c2c1052c2
+4 -2
View File
@@ -991,6 +991,8 @@ class baseDAO
/* Real-time save log. */
if(dao::$realTimeLog && dao::$realTimeFile) file_put_contents(dao::$realTimeFile, $sql . "\n", FILE_APPEND);
$table = $this->table;
$this->reset();
/* Force to query from master db, if db has been changed. */
@@ -998,11 +1000,11 @@ class baseDAO
$result = $this->dbh->exec($sql);
if($this->table)
if($table)
{
/* 更新表的缓存时间。*/
/* Update the table cache time. */
$table = str_replace(array('`', '"'), '', $this->table);
$table = str_replace(array('`', '"'), '', $table);
$this->setCache($table);
}