本文整理汇总了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