prefixTables() 공개 정적인 메소드

Returns an array containing the prefixed table names of every passed argument.
public static prefixTables ( ) : array
리턴 array The prefixed names in an array.
예제 #1
0
 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;
 }
예제 #2
0
 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'));
 }
예제 #3
0
 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);
 }
예제 #4
0
 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;
 }