本文整理汇总了PHP中PMA_DBI_field_len函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_DBI_field_len函数的具体用法?PHP PMA_DBI_field_len怎么用?PHP PMA_DBI_field_len使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PMA_DBI_field_len函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: date
if ($row_table_def['Type'] == 'datetime' && !isset($row_table_def['Default']) && !is_null($row_table_def['Default'])) {
// INSERT case
if ($insert_mode) {
if (isset($vrow)) {
$vrow[$rowfield] = date('Y-m-d H:i:s', time());
} else {
$vrow = array($rowfield => date('Y-m-d H:i:s', time()));
}
} else {
if (empty($vrow[$rowfield]) && is_null($vrow[$rowfield])) {
$vrow[$rowfield] = date('Y-m-d H:i:s', time());
}
}
// end if... else if...
}
$len = preg_match('@float|double@', $row_table_def['Type']) ? 100 : PMA_DBI_field_len($vresult, $i);
$first_timestamp = 0;
$bgcolor = $i % 2 ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo'];
?>
<tr>
<td <?php
echo $cfg['LongtextDoubleTextarea'] && strstr($row_table_def['True_Type'], 'longtext') ? 'rowspan="2"' : '';
?>
align="center" bgcolor="<?php
echo $bgcolor;
?>
"><?php
echo htmlspecialchars($field);
?>
</td>
<?php
示例2: PMA_extractFieldSpec
$timestamp_seen = 1;
$table_fields[$i]['first_timestamp'] = true;
}
$table_fields[$i]['pma_type'] = $table_fields[$i]['Type'];
$table_fields[$i]['wrap'] = ' nowrap="nowrap"';
break;
default:
$table_fields[$i]['pma_type'] = $table_fields[$i]['Type'];
$table_fields[$i]['wrap'] = ' nowrap="nowrap"';
break;
}
}
$field = $table_fields[$i];
$extracted_fieldspec = PMA_extractFieldSpec($field['Type']);
if (-1 === $field['len']) {
$field['len'] = PMA_DBI_field_len($vresult, $i);
}
$unnullify_trigger = $chg_evt_handler . "=\"return unNullify('" . PMA_escapeJsString($field['Field_md5']) . "', '" . PMA_escapeJsString($jsvkey) . "')\"";
// Use an MD5 as an array index to avoid having special characters in the name atttibute (see bug #1746964 )
$field_name_appendix = $vkey . '[' . $field['Field_md5'] . ']';
$field_name_appendix_md5 = $field['Field_md5'] . $vkey . '[]';
if ($field['Type'] == 'datetime' && !isset($field['Default']) && !is_null($field['Default']) && ($insert_mode || !isset($vrow[$field['Field']]))) {
// INSERT case or
// UPDATE case with an NULL value
$vrow[$field['Field']] = date('Y-m-d H:i:s', time());
}
?>
<tr class="<?php
echo $odd_row ? 'odd' : 'even';
?>
">
示例3: PMA_analyzeTableColumnsArray
$default_char_editing = $cfg['CharEditing'];
$odd_row = true;
for ($i = 0; $i < $columns_cnt; $i++) {
if (! isset($table_fields[$i]['processed'])) {
$column = $table_fields[$i];
$column = PMA_analyzeTableColumnsArray(
$column, $comments_map, $timestamp_seen
);
}
$extracted_columnspec
= PMA_Util::extractColumnSpec($column['Type']);
if (-1 === $column['len']) {
$column['len'] = PMA_DBI_field_len($current_result, $i);
// length is unknown for geometry fields,
// make enough space to edit very simple WKTs
if (-1 === $column['len']) {
$column['len'] = 30;
}
}
//Call validation when the form submited...
$unnullify_trigger = $chg_evt_handler
. "=\"return verificationsAfterFieldChange('"
. PMA_escapeJsString($column['Field_md5']) . "', '"
. PMA_escapeJsString($jsvkey) . "','".$column['pma_type'] . "')\"";
// Use an MD5 as an array index to avoid having special characters
// in the name atttibute (see bug #1746964 )
$column_name_appendix = $vkey . '[' . $column['Field_md5'] . ']';