本文整理匯總了PHP中PMA\libraries\Table::getColumnGenerationExpression方法的典型用法代碼示例。如果您正苦於以下問題:PHP Table::getColumnGenerationExpression方法的具體用法?PHP Table::getColumnGenerationExpression怎麽用?PHP Table::getColumnGenerationExpression使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PMA\libraries\Table
的用法示例。
在下文中一共展示了Table::getColumnGenerationExpression方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
break;
case 'NULL':
case 'CURRENT_TIMESTAMP':
$columnMeta['Default'] = $columnMeta['DefaultType'];
break;
}
$length = Util\get($_REQUEST, "field_length.{$columnNumber}", $length);
$submit_attribute = Util\get($_REQUEST, "field_attribute.{$columnNumber}", false);
$comments_map[$columnMeta['Field']] = Util\get($_REQUEST, "field_comments.{$columnNumber}");
$mime_map[$columnMeta['Field']] = array_merge($mime_map[$columnMeta['Field']], array('mimetype' => Util\get($_REQUEST, "field_mimetype.{${$columnNumber}}"), 'transformation' => Util\get($_REQUEST, "field_transformation.{${$columnNumber}}"), 'transformation_options' => Util\get($_REQUEST, "field_transformation_options.{${$columnNumber}}")));
} elseif (isset($fields_meta[$columnNumber])) {
$columnMeta = $fields_meta[$columnNumber];
$virtual = array('VIRTUAL', 'PERSISTENT', 'VIRTUAL GENERATED', 'STORED GENERATED');
if (in_array($columnMeta['Extra'], $virtual)) {
$tableObj = new Table($GLOBALS['table'], $GLOBALS['db']);
$expressions = $tableObj->getColumnGenerationExpression($columnMeta['Field']);
$columnMeta['Expression'] = $expressions[$columnMeta['Field']];
}
switch ($columnMeta['Default']) {
case null:
if (is_null($columnMeta['Default'])) {
// null
if ($columnMeta['Null'] == 'YES') {
$columnMeta['DefaultType'] = 'NULL';
$columnMeta['DefaultValue'] = '';
} else {
$columnMeta['DefaultType'] = 'NONE';
$columnMeta['DefaultValue'] = '';
}
} else {
// empty