?? tbl_structure.php
字號(hào):
} else { $binary = false; } $unsigned = stristr($row['Type'], 'unsigned'); $zerofill = stristr($row['Type'], 'zerofill'); } // rabus: Divide charset from the rest of the type definition (MySQL >= 4.1) unset($field_charset); if (PMA_MYSQL_INT_VERSION >= 40100) { if ((substr($type, 0, 4) == 'char' || substr($type, 0, 7) == 'varchar' || substr($type, 0, 4) == 'text' || substr($type, 0, 8) == 'tinytext' || substr($type, 0, 10) == 'mediumtext' || substr($type, 0, 8) == 'longtext' || substr($type, 0, 3) == 'set' || substr($type, 0, 4) == 'enum' ) && !$binary) { if (strpos($type, ' character set ')) { $type = substr($type, 0, strpos($type, ' character set ')); } if (!empty($row['Collation'])) { $field_charset = $row['Collation']; } else { $field_charset = ''; } } else { $field_charset = ''; } } // garvin: Display basic mimetype [MIME] if ($cfgRelation['commwork'] && $cfgRelation['mimework'] && $cfg['BrowseMIME'] && isset($mime_map[$row['Field']]['mimetype'])) { $type_mime = '<br />MIME: ' . str_replace('_', '/', $mime_map[$row['Field']]['mimetype']); } else { $type_mime = ''; } $attribute = ' '; if ($binary) { $attribute = 'BINARY'; } if ($unsigned) { $attribute = 'UNSIGNED'; } if ($zerofill) { $attribute = 'UNSIGNED ZEROFILL'; } // MySQL 4.1.2+ TIMESTAMP options // (if on_update_current_timestamp is set, then it's TRUE) if (isset($analyzed_sql[0]['create_table_fields'][$row['Field']]['on_update_current_timestamp'])) { $attribute = 'ON UPDATE CURRENT_TIMESTAMP'; } // here, we have a TIMESTAMP that SHOW FULL FIELDS reports as having the // NULL attribute, but SHOW CREATE TABLE says the contrary. Believe // the latter. if (!empty($analyzed_sql[0]['create_table_fields'][$row['Field']]['type']) && $analyzed_sql[0]['create_table_fields'][$row['Field']]['type'] == 'TIMESTAMP' && $analyzed_sql[0]['create_table_fields'][$row['Field']]['timestamp_not_null']) { $row['Null'] = ''; } if (!isset($row['Default'])) { if ($row['Null'] == 'YES') { $row['Default'] = '<i>NULL</i>'; } } else { $row['Default'] = htmlspecialchars($row['Default']); } $field_encoded = urlencode($row['Field']); $field_name = htmlspecialchars($row['Field']); // garvin: underline commented fields and display a hover-title (CSS only) $comment_style = ''; if (isset($comments_map[$row['Field']])) { $field_name = '<span style="border-bottom: 1px dashed black;" title="' . htmlspecialchars($comments_map[$row['Field']]) . '">' . $field_name . '</span>'; } if (isset($pk_array[$row['Field']])) { $field_name = '<u>' . $field_name . '</u>'; } echo "\n"; ?><tr class="<?php echo $odd_row ? 'odd': 'even'; $odd_row = !$odd_row; ?>"> <td align="center"> <input type="checkbox" name="selected_fld[]" value="<?php echo $field_encoded; ?>" id="checkbox_row_<?php echo $rownum; ?>" <?php echo $checked; ?> /> </td> <th nowrap="nowrap"><label for="checkbox_row_<?php echo $rownum; ?>"><?php echo $field_name; ?></label></th> <td<?php echo $type_nowrap; ?>><bdo dir="ltr" xml:lang="en"><?php echo $type; echo $type_mime; ?></bdo></td><?php echo PMA_MYSQL_INT_VERSION >= 40100 ? ' <td>' . (empty($field_charset) ? '' : '<dfn title="' . PMA_getCollationDescr($field_charset) . '">' . $field_charset . '</dfn>') . '</td>' . "\n" : '' ?> <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'])) { echo $row['Default']; } ?></td> <td nowrap="nowrap"><?php echo $row['Extra']; ?></td> <td align="center"> <a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('SELECT COUNT(*) AS ' . PMA_backquote($strRows) . ', ' . PMA_backquote($row['Field']) . ' FROM ' . PMA_backquote($table) . ' GROUP BY ' . PMA_backquote($row['Field']) . ' ORDER BY ' . PMA_backquote($row['Field'])); ?>"> <?php echo $titles['BrowseDistinctValues']; ?></a> </td> <?php if (! $tbl_is_view && ! $db_is_information_schema) { ?> <td align="center"> <a href="tbl_alter.php?<?php echo $url_query; ?>&field=<?php echo $field_encoded; ?>"> <?php echo $titles['Change']; ?></a> </td> <td align="center"> <?php // loic1: Drop field only if there is more than one field in the table if ($fields_cnt > 1) { echo "\n"; ?> <a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' DROP ' . PMA_backquote($row['Field'])); ?>&cpurge=1&purgekey=<?php echo urlencode($row['Field']); ?>&zero_rows=<?php echo urlencode(sprintf($strFieldHasBeenDropped, htmlspecialchars($row['Field']))); ?>" onclick="return confirmLink(this, 'ALTER TABLE <?php echo PMA_jsFormat($table); ?> DROP <?php echo PMA_jsFormat($row['Field']); ?>')"> <?php echo $titles['Drop']; ?></a> <?php } else { echo "\n" . ' ' . $titles['NoDrop']; } echo "\n"; ?> </td> <td align="center"> <?php if ($type == 'text' || $type == 'blob') { echo $titles['NoPrimary'] . "\n"; } else { echo "\n"; ?> <a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . (empty($primary) ? '' : ' DROP PRIMARY KEY,') . ' ADD PRIMARY KEY(' . PMA_backquote($row['Field']) . ')'); ?>&zero_rows=<?php echo urlencode(sprintf($strAPrimaryKey, htmlspecialchars($row['Field']))); ?>" onclick="return confirmLink(this, 'ALTER TABLE <?php echo PMA_jsFormat($table) . (empty($primary) ? '' : ' DROP PRIMARY KEY,'); ?> ADD PRIMARY KEY(<?php echo PMA_jsFormat($row['Field']); ?>)')"> <?php echo $titles['Primary']; ?></a> <?php } echo "\n"; ?> </td> <td align="center"> <?php if ($type == 'text' || $type == 'blob') { echo $titles['NoUnique'] . "\n"; } else { echo "\n"; ?> <a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD UNIQUE(' . PMA_backquote($row['Field']) . ')'); ?>&zero_rows=<?php echo urlencode(sprintf($strAnIndex, htmlspecialchars($row['Field']))); ?>"> <?php echo $titles['Unique']; ?></a> <?php } echo "\n"; ?> </td> <td align="center"> <?php if ($type == 'text' || $type == 'blob') { echo $titles['NoIndex'] . "\n"; } else { echo "\n"; ?> <a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD INDEX(' . PMA_backquote($row['Field']) . ')'); ?>&zero_rows=<?php echo urlencode(sprintf($strAnIndex, htmlspecialchars($row['Field']))); ?>"> <?php echo $titles['Index']; ?></a> <?php } echo "\n"; ?> </td> <?php if ((!empty($tbl_type) && $tbl_type == 'MYISAM') && (strpos(' ' . $type, 'text') || strpos(' ' . $type, 'varchar'))) { echo "\n"; ?> <td align="center" nowrap="nowrap"> <a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD FULLTEXT(' . PMA_backquote($row['Field']) . ')'); ?>&zero_rows=<?php echo urlencode(sprintf($strAnIndex, htmlspecialchars($row['Field']))); ?>"> <?php echo $titles['IdxFulltext']; ?></a> </td> <?php } else { echo "\n"; ?> <td align="center" nowrap="nowrap"> <?php echo $titles['NoIdxFulltext'] . "\n"; ?> </td> <?php } // end if... else... echo "\n"; } // end if (! $tbl_is_view && ! $db_is_information_schema) ?></tr> <?php unset($field_charset);} // end whileecho '</tbody>' . "\n" .'</table>' . "\n";$checkall_url = 'tbl_structure.php?' . PMA_generate_common_url($db, $table);?><img class="selectallarrow" src="<?php echo $pmaThemeImage . 'arrow_' . $text_dir . '.png'; ?>" width="38" height="22" alt="<?php echo $strWithChecked; ?>" /><a href="<?php echo $checkall_url; ?>&checkall=1" onclick="if (markAllRows('fieldsForm')) return false;"> <?php echo $strCheckAll; ?></a>/<a href="<?php echo $checkall_url; ?>" onclick="if (unMarkAllRows('fieldsForm')) return false;"> <?php echo $strUncheckAll; ?></a><i><?php echo $strWithChecked; ?></i><?phpif ($cfg['PropertiesIconic']) { PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_browse', $strBrowse, 'b_browse.png');} else { echo '<input type="submit" name="submit_mult" value="' . $strChange . '" title="' . $strChange . '" />' . "\n";}if (! $tbl_is_view && ! $db_is_information_schema) { if ($cfg['PropertiesIconic']) { PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_change', $strChange, 'b_edit.png'); // Drop button if there is at least two fields if ($fields_cnt > 1) { PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_drop', $strDrop, 'b_drop.png'); } PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_primary', $strPrimary, 'b_primary.png'); PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_unique', $strUnique, 'b_unique.png'); PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_index', $strIndex, 'b_index.png'); if ((!empty($tbl_type) && $tbl_type == 'MYISAM')) { PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_fulltext', $strIdxFulltext, 'b_ftext.png'); } } else { // Drop button if there is at least two fields if ($fields_cnt > 1) { echo '<i>' . $strOr . '</i>' . "\n" . '<input type="submit" name="submit_mult" value="' . $strDrop . '" title="' . $strDrop . '" />' . "\n"; } echo '<i>' . $strOr . '</i>' . "\n" . '<input type="submit" name="submit_mult" value="' . $strPrimary . '" title="' . $strPrimary . '" />' . "\n"; echo '<i>' . $strOr . '</i>' . "\n" . '<input type="submit" name="submit_mult" value="' . $strIndex . '" title="' . $strIndex . '" />' . "\n"; echo '<i>' . $strOr . '</i>' . "\n" . '<input type="submit" name="submit_mult" value="' . $strUnique . '" title="' . $strUnique . '" />' . "\n"; if ((!empty($tbl_type) && $tbl_type == 'MYISAM')) { echo '<i>' . $strOr . '</i>' . "\n" . '<input type="submit" name="submit_mult" value="' . $strIdxFulltext . '" title="' . $strIdxFulltext . '" />' . "\n"; } }}?></form><hr /><?php/** * Work on the table */?><a href="tbl_printview.php?<?php echo $url_query; ?>"><?phpif ($cfg['PropertiesIconic']) { echo '<img class="icon" src="' . $pmaThemeImage . 'b_print.png" width="16" height="16" alt="' . $strPrintView . '"/>';}echo $strPrintView;?></a><?phpif (! $tbl_is_view && ! $db_is_information_schema) { // if internal relations are available, or the table type is INNODB // ($tbl_type comes from libraries/tbl_info.inc.php) if ($cfgRelation['relwork'] || $tbl_type=="INNODB") { ?><a href="tbl_relation.php?<?php echo $url_query; ?>"><?php if ($cfg['PropertiesIconic']) { echo '<img class="icon" src="' . $pmaThemeImage . 'b_relations.png" width="16" height="16" alt="' . $strRelationView . '"/>'; }
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -