public static getMaxLengthCustomVariables ( ) : integer | ||
리턴 | integer |
public static function getMaxLengthCustomVariables()
{
return 200;
}
public function addCustomVariable() { $dbTable = $this->getDbTableName(); $index = $this->getHighestCustomVarIndex() + 1; $maxLen = CustomVariables::getMaxLengthCustomVariables(); Db::exec(sprintf('ALTER TABLE %s ', $dbTable) . sprintf('ADD COLUMN custom_var_k%d VARCHAR(%d) DEFAULT NULL,', $index, $maxLen) . sprintf('ADD COLUMN custom_var_v%d VARCHAR(%d) DEFAULT NULL;', $index, $maxLen)); return $index; }