当前位置: 首页>>代码示例>>PHP>>正文


PHP PMA_convert_bit_default_value函数代码示例

本文整理汇总了PHP中PMA_convert_bit_default_value函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_convert_bit_default_value函数的具体用法?PHP PMA_convert_bit_default_value怎么用?PHP PMA_convert_bit_default_value使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了PMA_convert_bit_default_value函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: htmlspecialchars

     //        statement MySQL auto-update it to the current timestamp
     // lem9:  however, things have changed since MySQL 4.1, so
     //        it's better to set a fields_prev in this situation
     $backup_field = '<input type="hidden" name="fields_prev' . $field_name_appendix . '" value="' . htmlspecialchars($vrow[$field['Field']]) . '" />';
 } else {
     // (we are inserting)
     // loic1: display default values
     if (!isset($field['Default'])) {
         $field['Default'] = '';
         $real_null_value = TRUE;
         $data = '';
     } else {
         $data = $field['Default'];
     }
     if ($field['True_Type'] == 'bit') {
         $special_chars = PMA_convert_bit_default_value($field['Default']);
     } else {
         $special_chars = htmlspecialchars($field['Default']);
     }
     $backup_field = '';
     $special_chars_encoded = PMA_duplicateFirstNewline($special_chars);
     // this will select the UNHEX function while inserting
     if (($field['is_binary'] || $field['is_blob'] && !$cfg['ProtectBinary']) && $_SESSION['tmp_user_values']['display_binary_as_hex'] && $cfg['ShowFunctionFields']) {
         $field['display_binary_as_hex'] = true;
     }
 }
 $idindex = $o_rows * $fields_cnt + $i + 1;
 $tabindex = ($idindex - 1) * 3 + 1;
 // The function column
 // -------------------
 // Change by Bernard M. Piller <bernard@bmpsystems.com>
开发者ID:fathitarek,项目名称:cop5725-dbms-project,代码行数:31,代码来源:tbl_change.php

示例2: isset

     }
 */
 // old column default
 if ($is_backup) {
     $_form_params['field_default_orig[' . $i . ']'] = isset($row['Default']) ? $row['Default'] : '';
 }
 // here we put 'NONE' as the default value of drop-down; otherwise
 // users would have problems if they forget to enter the default
 // value (example, for an INT)
 $default_options = array('NONE' => _pgettext('for default', 'None'), 'USER_DEFINED' => __('As defined:'), 'NULL' => 'NULL', 'CURRENT_TIMESTAMP' => 'CURRENT_TIMESTAMP');
 // for a TIMESTAMP, do not show the string "CURRENT_TIMESTAMP" as a default value
 if ($type_upper == 'TIMESTAMP' && !empty($default_current_timestamp) && isset($row['Default'])) {
     $row['Default'] = '';
 }
 if ($type_upper == 'BIT') {
     $row['DefaultValue'] = PMA_convert_bit_default_value($row['DefaultValue']);
 }
 $content_cells[$i][$ci] = '<select name="field_default_type[' . $i . ']">';
 foreach ($default_options as $key => $value) {
     $content_cells[$i][$ci] .= '<option value="' . $key . '"';
     // is only set when we go back to edit a field's structure
     if (isset($row['DefaultType']) && $row['DefaultType'] == $key) {
         $content_cells[$i][$ci] .= ' selected="selected"';
     }
     $content_cells[$i][$ci] .= ' >' . $value . '</option>';
 }
 $content_cells[$i][$ci] .= '</select>';
 $content_cells[$i][$ci] .= '<br />';
 $content_cells[$i][$ci] .= '<input id="field_' . $i . '_' . ($ci - $ci_offset) . '"' . ' type="text" name="field_default_value[' . $i . ']" size="12"' . ' value="' . (isset($row['DefaultValue']) ? htmlspecialchars($row['DefaultValue']) : '') . '"' . ' class="textfield" />';
 $ci++;
 // column collation
开发者ID:BGCX262,项目名称:zuozhenshi-prego-svn-to-git,代码行数:31,代码来源:tbl_properties.inc.php

示例3: empty

    echo empty($field_charset) ? '' : '<dfn title="' . PMA_getCollationDescr($field_charset) . '">' . $field_charset . '</dfn>';
    ?>
</td>
    <td nowrap="nowrap" style="font-size: 70%"><?php 
    echo $attribute;
    ?>
</td>
    <td><?php 
    echo $row['Null'] == 'YES' ? $strYes : $strNo;
    ?>
</td>
    <td nowrap="nowrap"><?php 
    if (isset($row['Default'])) {
        if ($extracted_fieldspec['type'] == 'bit') {
            // here, $row['Default'] contains something like b'010'
            echo PMA_convert_bit_default_value($row['Default']);
        } else {
            echo $row['Default'];
        }
    } else {
        echo '<i>' . $strNoneDefault . '</i>';
    }
    ?>
</td>
    <td nowrap="nowrap"><?php 
    echo strtoupper($row['Extra']);
    ?>
</td>
    <td align="center">
        <a href="sql.php?<?php 
    echo $url_query;
开发者ID:nesthub,项目名称:php_jannus,代码行数:31,代码来源:tbl_structure.php

示例4: PMA_getSpecialCharsAndBackupFieldForInsertingMode

/**
 * display default values
 *
 * @param type    $column          description of column in given table
 * @param boolean $real_null_value whether column value null or not null
 *
 * @return array $real_null_value, $data, $special_chars,
 *               $backup_field, $special_chars_encoded
 */
function PMA_getSpecialCharsAndBackupFieldForInsertingMode($column, $real_null_value)
{
    if (!isset($column['Default'])) {
        $column['Default'] = '';
        $real_null_value = true;
        $data = '';
    } else {
        $data = $column['Default'];
    }
    if ($column['True_Type'] == 'bit') {
        $special_chars = PMA_convert_bit_default_value($column['Default']);
    } else {
        $special_chars = htmlspecialchars($column['Default']);
    }
    $backup_field = '';
    $special_chars_encoded = PMA_Util::duplicateFirstNewline($special_chars);
    // this will select the UNHEX function while inserting
    if (($column['is_binary'] || $column['is_blob'] && !$GLOBALS['cfg']['ProtectBinary']) && (isset($_SESSION['tmp_user_values']['display_binary_as_hex']) && $_SESSION['tmp_user_values']['display_binary_as_hex']) && $GLOBALS['cfg']['ShowFunctionFields']) {
        $column['display_binary_as_hex'] = true;
    }
    return array($real_null_value, $data, $special_chars, $backup_field, $special_chars_encoded);
}
开发者ID:nhodges,项目名称:phpmyadmin,代码行数:31,代码来源:insert_edit.lib.php

示例5: testConvert_bit_default_value_test

 /**
  * @dataProvider dataProvider
  */
 function testConvert_bit_default_value_test($bit, $val)
 {
     $this->assertEquals($val, PMA_convert_bit_default_value($bit));
 }
开发者ID:bugyak,项目名称:phporadmin,代码行数:7,代码来源:PMA_convert_bit_default_value_test.php

示例6: htmlspecialchars

            <?php
            if ($field['Key'] == 'PRI') {
                echo '<td><b><u>' . htmlspecialchars($field['Field']) . '</u></b></td>' . "\n";
            } else {
                echo '<td><b>' . htmlspecialchars($field['Field']) . '</b></td>' . "\n";
            }
            ?>
            <td><?php echo htmlspecialchars($field['Type']);?></td>
            <td><?php echo htmlspecialchars($field['Collation']);?></td>
            <td><?php echo (($field['Null'] == 'YES') ? __('Yes') : __('No')); ?></td>
            <td><?php
            if (isset($field['Default'])) {
                $extracted_columnspec = PMA_extractColumnSpec($field['Type']);
                if ($extracted_columnspec['type'] == 'bit') {
                    // here, $field['Default'] contains something like b'010'
                    echo PMA_convert_bit_default_value($field['Default']);
                } else {
                    echo htmlspecialchars($field['Default']);
                }
            } else {
                if ($field['Null'] == 'YES') {
                    echo '<i>NULL</i>';
                } else {
                    echo '<i>' . _pgettext('None for default', 'None') . '</i>';
                }
            } ?></td>
            <td><?php echo htmlspecialchars($field['Extra']);?></td>
            <td><?php echo htmlspecialchars($field['Comment']);?></td>
        </tr>
<?php
            if ($style == 'even') {
开发者ID:nicokaiser,项目名称:phpmyadmin,代码行数:31,代码来源:tbl_tracking.php


注:本文中的PMA_convert_bit_default_value函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。