新的逻辑引入了新的bug,会导致在跨多库连接时,产生表名前缀映射混乱,需要再做逻辑上的修复。
function table_name($tablename) { if(!empty($this->map) && !empty($this->map[$tablename])) { $id = $this->map[$tablename]; if(!empty($this->config[$id]['tablepre'])){ $this->tablepre = $this->config[$id]['tablepre']; } if(!$this->link[$id]) { $this->connect($id); } $this->curlink = $this->link[$id]; } else { $this->tablepre = $this->config['1']['tablepre']; $this->curlink = $this->link[1]; } return $this->tablepre.$tablename; }