當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PMA_DBI_field_len函數代碼示例

本文整理匯總了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 
開發者ID:Apxe,項目名稱:Rubin_final,代碼行數:31,代碼來源:tbl_change.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';
        ?>
">
開發者ID:fathitarek,項目名稱:cop5725-dbms-project,代碼行數:31,代碼來源:tbl_change.php

示例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'] . ']';
開發者ID:nhodges,項目名稱:phpmyadmin,代碼行數:31,代碼來源:tbl_change.php


注:本文中的PMA_DBI_field_len函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。