init web ems all
This commit is contained in:
67
wxc2_omc/fault/alarmList/getAlarmLevelandNum.php
Executable file
67
wxc2_omc/fault/alarmList/getAlarmLevelandNum.php
Executable file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
require("../../inc/header.inc");
|
||||
|
||||
|
||||
|
||||
$dbName = 'OMC_PUB';
|
||||
|
||||
$defTable = 'sysAlarmConf';
|
||||
|
||||
$logTable = 'sysAlarmLog';
|
||||
|
||||
|
||||
|
||||
$showSql=" SELECT t2.alarmLevel,count(*) as number
|
||||
|
||||
FROM $logTable as t1,$defTable as t2
|
||||
|
||||
WHERE t1.clearTime = '0'
|
||||
mysqli_fetch_array(
|
||||
AND t1.sysTypeNo = t2.sysTypeNo
|
||||
|
||||
AND t1.compCode = t2.compCode
|
||||
|
||||
AND t1.alarmCode = t2.alarmCode
|
||||
|
||||
GROUP BY t2.alarmLevel
|
||||
|
||||
";mysqli_fetch_array(
|
||||
|
||||
if($DEBUG) echo "<br>showSql=$showSql";
|
||||
|
||||
$result=@mysqli_query($pubConn,$showSql);
|
||||
|
||||
echo mysqli_error($pubConn);
|
||||
|
||||
|
||||
|
||||
while($rows=@mysql_fetch_array($result))
|
||||
|
||||
{
|
||||
|
||||
$alarmNumArr[$rows[alarmLevel]][number]=$rows[number];
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$selSql = "SELECT AlarmLevel as alarmLevel,count(*) as numbe
|
||||
|
||||
FROM BssOmcDb.OMCR_ALARMEVENT WHERE ClearTime = '0' GROUP BY alarmLevel";
|
||||
|
||||
$result=@mysqli_query($pubConn,$showSql);
|
||||
|
||||
echo mysqli_error($pubConn);
|
||||
|
||||
while($rows=@mysql_fetch_array($result))
|
||||
|
||||
{
|
||||
|
||||
$alarmNumArr[$rows[alarmLevel]][number]+=$rows[number];
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user