Returns an array containing the prefixed table names of every passed argument.
public static prefixTables ( ) : array | ||
return | array | The prefixed names in an array. |
public static function getDeleteTableLogTables() { $result = Common::prefixTables('log_conversion', 'log_link_visit_action', 'log_visit', 'log_conversion_item'); if (Db::isLockPrivilegeGranted()) { $result[] = Common::prefixTable('log_action'); } return $result; }
protected function lockLogTables($generic) { $generic->lockTables($readLocks = Common::prefixTables('log_conversion', 'log_link_visit_action', 'log_visit', 'log_conversion_item'), $writeLocks = Common::prefixTable('log_action')); }
private function deleteUnusedActions() { list($logActionTable, $tempTableName) = Common::prefixTables("log_action", self::DELETE_UNUSED_ACTIONS_TEMP_TABLE_NAME); $deleteSql = "DELETE LOW_PRIORITY QUICK IGNORE {$logActionTable}\n\t\t\t\t\t\tFROM {$logActionTable}\n\t\t\t\t LEFT JOIN {$tempTableName} tmp ON tmp.idaction = {$logActionTable}.idaction\n\t\t\t\t\t WHERE tmp.idaction IS NULL"; Db::query($deleteSql); }
public function isLockPrivilegeGranted() { $granted = false; try { $this->beginTransaction(); $this->lockTables(Common::prefixTables('log_visit'), array()); $this->rollback(); $granted = true; } catch (Exception $ex) { $granted = false; } return $granted; }