本文整理汇总了PHP中DBConnection::CountTableRows方法的典型用法代码示例。如果您正苦于以下问题:PHP DBConnection::CountTableRows方法的具体用法?PHP DBConnection::CountTableRows怎么用?PHP DBConnection::CountTableRows使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBConnection
的用法示例。
在下文中一共展示了DBConnection::CountTableRows方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: db_manage
function db_manage($tmp, $page, $TABLE)
{
$select_table = null;
if ($_POST['tables']) {
$select_table = $_POST['tables'];
}
$db = new DBConnection();
$tables = $db->DbTableList($select_table);
foreach ($TABLE as $key => $value) {
$count_table = 0;
if (in_array($key, $tables)) {
$count_table = $db->CountTableRows('*', $key);
$checked[] = $key;
}
$checkbox[$key] = "{$key} ({$count_table})";
}
$tmp->assign('db_list', $checkbox);
$tmp->assign('selected_db', $checked);
$tmp->assign('tab_page', $page);
}
示例2: Template
# Index page
#
# Release Notes:
##
#set_include_path("../../usr/share/pear/");
$path = '/php/bin/php';
#set_include_path(get_include_path() . PATH_SEPARATOR . $path);
#phpinfo();
require_once "lib/DB.class.php";
require_once "lib/Report.class.php";
require_once "lib/Template.class.php";
require_once "lib/Resource.class.php";
$tmp = new Template();
$db = new DBConnection();
#$tmp->debugging = true;
$vhost = $db->CountTableRows('DomainID', 'domain WHERE Deleted=0');
$modsec_conf = $db->CountTableRows('ConfID', 'modsec_conf WHERE Deleted=0');
$rules = $db->CountTableRows('RecordID', 'rules WHERE Deleted=0');
$rule_files = $db->CountTableRows('RuleFileID', 'rule_files WHERE Deleted=0');
$rule_dfiles = $db->CountTableRows('DataFileID', 'rule_data_files WHERE Deleted=0');
$rule_data = $db->CountTableRows('RuleDataID', 'rule_data WHERE Deleted=0');
$blocked_ip = $db->CountTableRows('*', 'ip_block_list');
$dalert = $db->countAllAuditLogs(' AND AL.AuditLogDate=CURDATE()');
$walert = $db->countAllAuditLogs(' AND WEEK(AL.AuditLogDate,1)=WEEK(CURDATE(),1)');
$malert = $db->countAllAuditLogs(' AND MONTH(AL.AuditLogDate)=MONTH(CURDATE())');
$tmp->assign('vhost', $vhost);
$tmp->assign('modsec_conf', $modsec_conf);
$tmp->assign('rules', $rules);
$tmp->assign('rule_files', $rule_files);
$tmp->assign('rule_dfiles', $rule_dfiles);
$tmp->assign('rule_data', $rule_data);