21,886
社区成员
发帖
与我相关
我的任务
分享
while ($row = mssql_fetch_row($res)){
$vals[strtolower(str_replace($search, '', $row[0]))] = (empty($row[1]) ? '0' : $row[1]);
}
#$res = mssql_query($sql, $link);
$res = sqlsrv_query($conn,$sql);
$search = array(' ', '/sec', '(KB)', '/', '-');
while ($row = mssql_fetch_row($res)){
$vals[strtolower(str_replace($search, '', $row[0]))] = (empty($row[1]) ? '0' : $row[1]);
}
$vals['buffercachehitratio'] = $vals['buffercachehitratio'] / $vals['buffercachehitratiobase'] * 100;
$vals['logcachehitratio'] = $vals['logcachehitratio'] / $vals['logcachehitratiobase'] * 100;
$vals['proccachehitratio'] = $vals['cachehitratio'] / $vals['cachehitratiobase'] * 100;
$vals['memoryhitratio'] = $vals['totalservermemory'] / $vals['targetservermemory'] * 100;
unset($vals['buffercachehitratiobase'], $vals['logcachehitratiobase'], $vals['cachehitratiobase'], $vals['cachehitratio']);
while ($row = sqlsrv_fetch_array($res, SQLSRV_FETCH_NUMERIC)){
$vals[strtolower(str_replace($search, '', $row[0]))] = (empty($row[1]) ? '0' : $row[1]);
}
// 这里这样打呢?
var_dump($vals);exit;
while ($row = sqlsrv_fetch_array($res, SQLSRV_FETCH_NUMERIC){
while ($row = sqlsrv_fetch_array($res, SQLSRV_FETCH_NUM)){