Beispiel #1
0
 protected function updateNextNumber()
 {
     $backMsg = '';
     $tableList = DBMaintenance::getTableList();
     foreach ($tableList as $t) {
         // Make sure that it is our table and not something else
         if (preg_match('/^tbl.*$/', $t)) {
             continue;
         }
         if (DBMaintenance::addTableToNextNumber($t, 'XXX000000')) {
             $backMsg .= '<br/>Added ' . $t;
         }
     }
     if ($backMsg == '') {
         $backMsg = '<br/>No Updates required';
     }
     return '<b>Updated tblNextNumber</b>' . $backMsg;
 }
Beispiel #2
0
 public function auditTable()
 {
     if (in_array(null, [$this->db, $this->tableName, $this->tableStructure])) {
         return false;
     }
     if (!isset(self::$tableList[$this->db])) {
         self::$tableList[$this->db] = array_flip(DBMaintenance::getTableList());
     }
     if (!isset(self::$tableList[$this->db][$this->tableName])) {
         DB::exec($this->db, $this->tableStructure);
         DBMaintenance::addTableToNextNumber($this->tableName, $this->keyFormat, $this->tableName);
         self::$tableList[$this->db][$this->tableName] = 1;
     }
     return true;
 }