Example #1
0
function print_table_stats($p_table_name)
{
    $t_count = helper_table_row_count($p_table_name);
    echo "{$p_table_name} = {$t_count} records<br />";
}
Example #2
0
 * @param string $p_table Table name.
 * @return integer row count
 */
function helper_table_row_count($p_table)
{
    $t_table = $p_table;
    $t_query = 'SELECT COUNT(*) FROM ' . $t_table;
    $t_result = db_query($t_query);
    $t_count = db_result($t_result);
    return $t_count;
}
?>
<div class="table-container">
<table cellspacing="1">
<tr>
<td class="form-title" width="30%" colspan="2"><?php 
echo lang_get('mantisbt_database_statistics');
?>
</td>
</tr>
<?php 
foreach (db_get_table_list() as $t_table) {
    if (db_table_exists($t_table)) {
        print_info_row($t_table, helper_table_row_count($t_table) . ' records');
    }
}
?>
</table>
</div>
<?php 
html_page_bottom();
Example #3
0
    $t_query = 'SELECT COUNT(*) FROM ' . $t_table;
    $t_result = db_query($t_query);
    $t_count = db_result($t_result);
    return $t_count;
}
?>
<div class="table-container">
	<h2><?php 
echo lang_get('mantisbt_database_statistics');
?>
</h2>
	<table cellspacing="1">
		<thead>
			<tr class="row-category">
				<th>Table Name</th>
				<th>Record Count</th>
			</tr>
		<thead>
		<tbody>
<?php 
foreach (db_get_table_list() as $t_table) {
    if (db_table_exists($t_table)) {
        print_info_row($t_table, helper_table_row_count($t_table));
    }
}
?>
		</tbody>
	</table>
</div>
<?php 
html_page_bottom();
Example #4
0
function print_table_stats($p_table_name)
{
    $t_count = helper_table_row_count($p_table_name);
    # echo "<tr><td>$p_table_name</td><td>$t_count</td></tr>";
    echo "{$p_table_name} = {$t_count} records<br />";
}