notice about max row count for a view
This commit is contained in:
@@ -11,11 +11,12 @@ $Source$
|
|||||||
* lang/japanese: Update, thanks to Tadashi Jokagi - elf2000.
|
* lang/japanese: Update, thanks to Tadashi Jokagi - elf2000.
|
||||||
* lang/italian: update, thanks to Luca Rebellato
|
* lang/italian: update, thanks to Luca Rebellato
|
||||||
* lang/norwegian: Update, thanks to Sven-Erik Andersen
|
* lang/norwegian: Update, thanks to Sven-Erik Andersen
|
||||||
|
* db_details_structure.php: bug #1396998, notice for view row count
|
||||||
|
in table list
|
||||||
|
|
||||||
2006-01-28 Marc Delisle <lem9@users.sourceforge.net>
|
2006-01-28 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* libraries/common.lib.php: bug #1396998, avoid displaying exact row
|
* libraries/common.lib.php: bug #1396998, avoid displaying exact row
|
||||||
count for views, work in progress. TODO: display the $strViewMaxExactCount
|
count for views, work in progress
|
||||||
message, and change Documentation.html
|
|
||||||
|
|
||||||
2006-01-26 Michal Čihař <michal@cihar.com>
|
2006-01-26 Michal Čihař <michal@cihar.com>
|
||||||
* lang/czech: Translation update.
|
* lang/czech: Translation update.
|
||||||
|
@@ -151,6 +151,8 @@ $row_count = 0;
|
|||||||
|
|
||||||
$hidden_fields = array();
|
$hidden_fields = array();
|
||||||
$odd_row = true;
|
$odd_row = true;
|
||||||
|
$at_least_one_view = false;
|
||||||
|
|
||||||
foreach ( $tables as $keyname => $each_table ) {
|
foreach ( $tables as $keyname => $each_table ) {
|
||||||
if ( $each_table['TABLE_ROWS'] === null || $each_table['TABLE_ROWS'] < $GLOBALS['cfg']['MaxExactCount']) {
|
if ( $each_table['TABLE_ROWS'] === null || $each_table['TABLE_ROWS'] < $GLOBALS['cfg']['MaxExactCount']) {
|
||||||
$each_table['TABLE_ROWS'] = PMA_countRecords( $db,
|
$each_table['TABLE_ROWS'] = PMA_countRecords( $db,
|
||||||
@@ -161,6 +163,9 @@ foreach ( $tables as $keyname => $each_table ) {
|
|||||||
// MySQL < 5.0.13 returns "view", >= 5.0.13 returns "VIEW"
|
// MySQL < 5.0.13 returns "view", >= 5.0.13 returns "VIEW"
|
||||||
$table_is_view = ( $each_table['TABLE_TYPE'] === 'VIEW'
|
$table_is_view = ( $each_table['TABLE_TYPE'] === 'VIEW'
|
||||||
|| $each_table['TABLE_TYPE'] === 'SYSTEM VIEW' );
|
|| $each_table['TABLE_TYPE'] === 'SYSTEM VIEW' );
|
||||||
|
if ($table_is_view) {
|
||||||
|
$at_least_one_view = true;
|
||||||
|
}
|
||||||
|
|
||||||
$alias = (!empty($tooltip_aliasname) && isset($tooltip_aliasname[$each_table['TABLE_NAME']]))
|
$alias = (!empty($tooltip_aliasname) && isset($tooltip_aliasname[$each_table['TABLE_NAME']]))
|
||||||
? htmlspecialchars($tooltip_aliasname[$each_table['TABLE_NAME']])
|
? htmlspecialchars($tooltip_aliasname[$each_table['TABLE_NAME']])
|
||||||
@@ -317,7 +322,7 @@ foreach ( $tables as $keyname => $each_table ) {
|
|||||||
<?php echo $titles['Drop']; ?></a></td>
|
<?php echo $titles['Drop']; ?></a></td>
|
||||||
<?php } // end if ( ! $db_is_information_schema ) ?>
|
<?php } // end if ( ! $db_is_information_schema ) ?>
|
||||||
<?php if ( isset( $each_table['TABLE_ROWS'] ) ) { ?>
|
<?php if ( isset( $each_table['TABLE_ROWS'] ) ) { ?>
|
||||||
<td class="value"><?php echo PMA_formatNumber( $each_table['TABLE_ROWS'], 0 ); ?></td>
|
<td class="value"><?php echo PMA_formatNumber( $each_table['TABLE_ROWS'], 0 ) . ($table_is_view && $each_table['TABLE_ROWS'] >= $cfg['MaxExactCount'] ? '<sup>1</sup>' : ''); ?></td>
|
||||||
<?php if (!($cfg['PropertiesNumColumns'] > 1)) { ?>
|
<?php if (!($cfg['PropertiesNumColumns'] > 1)) { ?>
|
||||||
<td nowrap="nowrap"><?php echo $each_table['ENGINE']; ?></td>
|
<td nowrap="nowrap"><?php echo $each_table['ENGINE']; ?></td>
|
||||||
<?php if ( isset( $collation ) ) { ?>
|
<?php if ( isset( $collation ) ) { ?>
|
||||||
@@ -441,6 +446,15 @@ echo ' <option value="' . $strAnalyzeTable . '" >'
|
|||||||
<?php echo implode( "\n", $hidden_fields ) . "\n"; ?>
|
<?php echo implode( "\n", $hidden_fields ) . "\n"; ?>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
<?php
|
||||||
|
// Notice about row count for views
|
||||||
|
|
||||||
|
if ($at_least_one_view && !$db_is_information_schema) {
|
||||||
|
echo '<div class="notice">' . "\n";
|
||||||
|
echo '<p><sup>1</sup>' . PMA_sanitize(sprintf($strViewMaxExactCount, $cfg['MaxExactCount'], '[a@./Documentation.html#cfg_MaxExactCount@_blank]', '[/a]')) . '</p>' . "\n";
|
||||||
|
echo '</div>' . "\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
Reference in New Issue
Block a user