protected function hookAddColumnSsi() { if ($this->connection->table_exists('memdefaults')) { $dataR = $this->connection->query('SELECT memtype, SSI FROM memdefaults'); $tempModel = new MemtypeModel($this->connection); while ($dataW = $this->connection->fetch_row($dataR)) { $tempModel->reset(); $tempModel->memtype($dataW['memtype']); if ($tempModel->load()) { $tempModel->ssi($dataW['SSI']); $tempModel->save(); } } } }