当前位置: 首页>>代码示例>>PHP>>正文


PHP ocirowcount函数代码示例

本文整理汇总了PHP中ocirowcount函数的典型用法代码示例。如果您正苦于以下问题:PHP ocirowcount函数的具体用法?PHP ocirowcount怎么用?PHP ocirowcount使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ocirowcount函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: affectedRows

 function affectedRows($r = 0)
 {
     if (!$r) {
         $r = $this->lastResult;
     }
     return ocirowcount($this->lastResult);
 }
开发者ID:techczech,项目名称:tuit,代码行数:7,代码来源:driver-oci8.inc.php

示例2: affectedRows

 function affectedRows($ressource = null)
 {
     if ($ressource !== null && get_class($ressource) == 'CopixDbResultSetOci8') {
         return ocirowcount($ressource->_idResult);
     } else {
         return -1;
     }
 }
开发者ID:BackupTheBerlios,项目名称:phpaie,代码行数:8,代码来源:CopixDbConnection.oci8.class.php

示例3: OracleDeleteQueryResult

 /**
  * The constructor.
  * @access public
  * @param integer $resourceId The resource id for this query.
  */
 function OracleDeleteQueryResult($resourceId)
 {
     // ** parameter validation
     $resourceRule = ResourceValidatorRule::getRule();
     ArgumentValidator::validate($resourceId, $resourceRule, true);
     // ** end of parameter validation
     $this->_resourceId = $resourceId;
     $this->_numberOfRows = ocirowcount($this->_resourceId);
 }
开发者ID:adamfranco,项目名称:harmoni,代码行数:14,代码来源:OracleDeleteQueryResult.class.php

示例4: OracleInsertQueryResult

 /**
  * Creates a new OracleINSERTQueryResult object.
  * @access public
  * @param integer $resourceId The resource id for this query.
  * @param integer $lastId The last id that was inserted
  * @return object A new OracleINSERTQueryResult object.
  */
 function OracleInsertQueryResult($resourceId, $lastId)
 {
     // ** parameter validation
     $resourceRule = ResourceValidatorRule::getRule();
     $integerRule = OptionalRule::getRule(IntegerValidatorRule::getRule());
     ArgumentValidator::validate($resourceId, $resourceRule, true);
     ArgumentValidator::validate($lastId, $integerRule, true);
     // ** end of parameter validation
     $this->_resourceId = $resourceId;
     $this->_numberOfRows = ocirowcount($this->_resourceId);
     $this->_lastAutoIncrementValue = $lastId;
 }
开发者ID:adamfranco,项目名称:harmoni,代码行数:19,代码来源:OracleInsertQueryResult.class.php

示例5: _affectedRows

 function _affectedRows()
 {
     return is_resource($this->_lastrs) ? ocirowcount($this->_lastrs) : false;
 }
开发者ID:uwitec,项目名称:01technology,代码行数:4,代码来源:Oracle.php

示例6: oracle_login

if (!$conn) {
    $conn = oracle_login($PHPSPLOIT, "DEDICATED");
}
if (!$conn) {
    $err = @oci_error();
    return error("ERROR: ocilogon(): %s", $err["message"]);
}
// Send query
$query = @ociparse($conn, $PHPSPLOIT['QUERY']);
if (!$query) {
    $err = @oci_error();
    return error("ERROR: ociparse(): %s", $err["message"]);
}
$statement_type = @ocistatementtype($query);
if (!ociexecute($query)) {
    $err = @oci_error($query);
    return error("ERROR: ociexecute(): %s", $err["message"]);
}
if ($statement_type == "SELECT") {
    $result = array();
    $obj = oci_fetch_array($query, OCI_ASSOC + OCI_RETURN_NULLS);
    $result[] = array_keys($obj);
    $result[] = array_values($obj);
    while ($line = oci_fetch_array($query, OCI_ASSOC + OCI_RETURN_NULLS)) {
        $result[] = array_values($line);
    }
    return array('GET', count($result) - 1, $result);
} else {
    $rows = @ocirowcount($query);
    return array('SET', $rows);
}
开发者ID:enddo,项目名称:phpsploit,代码行数:31,代码来源:payload.php

示例7: AffectedRows

 function AffectedRows($rsMain)
 {
     return is_resource($rsMain) ? ocirowcount($rsMain) : false;
 }
开发者ID:modulexcite,项目名称:frameworks,代码行数:4,代码来源:dbClass2.php

示例8: _get_stats_flag_data

 function _get_stats_flag_data($conn_db, $v1, $v2, $stats_flag, $date)
 {
     $v2_index = '';
     $v2_index = strstr($v2, '点击数(总量)') ? 'TOTAL_CLI' : $v2_index;
     $v2_index = strstr($v2, '点击数(独立IP)') ? 'TOTAL_IP' : $v2_index;
     $v2_index = strstr($v2, '点击数(人均)') ? 'AVG' : $v2_index;
     if ($v2_index == '') {
         echo 'v2 参数错误';
         return false;
     }
     $url = "http://partner.site.com/interface/rd/sc?ud={$date}&cli={$stats_flag}";
     $chinfo = null;
     $result = _curl($chinfo, $url);
     if ($result == '') {
         echo "接口数据有误";
         return fasle;
     }
     $result = json_decode($result, true);
     $result = $result[0];
     if ($v2_index == 'AVG' && $result['TOTAL_IP']) {
         $result['AVG'] = $result['TOTAL_CLI'] / $result['TOTAL_IP'];
     } else {
         $result['AVG'] = 0;
     }
     //更新配置表
     $sql = "update {$this->report_monitor} set fun_count=:fun_count where v1=:v1 and v2=:v2 and cal_date =to_date(:cal_date,'yyyy-mm-dd hh24:mi:ss')";
     $stmt = _ociparse($conn_db, $sql);
     _ocibindbyname($stmt, ':v1', $v1);
     _ocibindbyname($stmt, ':v2', $v2);
     _ocibindbyname($stmt, ':cal_date', $date);
     _ocibindbyname($stmt, ':fun_count', $result[$v2_index]);
     $error = _ociexecute($stmt);
     if (ocirowcount($stmt)) {
         $sql = "insert into {$this->report_monitor}(id, v1, v2, v3, v5,  fun_count, cal_date, md5, add_time ) values\n                (seq_{$this->report_monitor}.nextval, :v1, :v2, :vip, :vip, :fun_count, to_date(:cal_date,'yyyy-mm-dd hh24:mi:ss'), :md5, sysdate)";
         $stmt = _ociparse($conn_db, $sql);
         _ocibindbyname($stmt, ':v1', $v1);
         _ocibindbyname($stmt, ':v2', $v2);
         _ocibindbyname($stmt, ':vip', VIP);
         _ocibindbyname($stmt, ':fun_count', $result[$v2_index]);
         _ocibindbyname($stmt, ':cal_date', $date);
         _ocibindbyname($stmt, ':md5', md5($v1 . $v2 . $date));
         $error = _ociexecute($stmt);
     }
     //更新天表数据
     $sql = "update {$this->report_monitor_date} set fun_count=:fun_count where v1=:v1 and v2=:v2 and cal_date =to_date(:cal_date,'yyyy-mm-dd')";
     $stmt = _ociparse($conn_db, $sql);
     _ocibindbyname($stmt, ':v1', $v1);
     _ocibindbyname($stmt, ':v2', $v2);
     _ocibindbyname($stmt, ':cal_date', $date);
     _ocibindbyname($stmt, ':fun_count', $result[$v2_index]);
     $error = _ociexecute($stmt);
     var_dump($error);
     if (!ocirowcount($stmt)) {
         $sql = "insert into {$this->report_monitor_date}( v1, v2, fun_count, cal_date) values\n                ( :v1, :v2, :fun_count, to_date(:cal_date,'yyyy-mm-dd hh24:mi:ss'))";
         $stmt = _ociparse($conn_db, $sql);
         _ocibindbyname($stmt, ':v1', $v1);
         _ocibindbyname($stmt, ':v2', $v2);
         _ocibindbyname($stmt, ':fun_count', $result[$v2_index]);
         _ocibindbyname($stmt, ':cal_date', $date);
         $error = _ociexecute($stmt);
         var_dump($error);
     }
     //更新小时表数据
     $sql = "update {$this->report_monitor_hour} set fun_count=:fun_count where v1=:v1 and v2=:v2 and cal_date =to_date(:cal_date,'yyyy-mm-dd hh24:mi:ss')";
     $stmt = _ociparse($conn_db, $sql);
     _ocibindbyname($stmt, ':v1', $v1);
     _ocibindbyname($stmt, ':v2', $v2);
     _ocibindbyname($stmt, ':cal_date', $date);
     _ocibindbyname($stmt, ':fun_count', $result[$v2_index]);
     $error = _ociexecute($stmt);
     var_dump($error);
     if (!ocirowcount($stmt)) {
         $sql = "insert into {$this->report_monitor_hour}( v1, v2, v3, fun_count, cal_date ) values\n                (:v1, :v2, :v3, :fun_count, to_date(:cal_date,'yyyy-mm-dd hh24:mi:ss'))";
         $stmt = _ociparse($conn_db, $sql);
         _ocibindbyname($stmt, ':v1', $v1);
         _ocibindbyname($stmt, ':v2', $v2);
         _ocibindbyname($stmt, ':v3', VIP);
         _ocibindbyname($stmt, ':fun_count', $result[$v2_index]);
         _ocibindbyname($stmt, ':cal_date', $date);
         $error = _ociexecute($stmt);
         var_dump($error);
     }
 }
开发者ID:sdgdsffdsfff,项目名称:phpapm,代码行数:83,代码来源:P1D_ClickStats.php

示例9: sql_affectedrows

 /**
  * Return number of affected rows
  */
 function sql_affectedrows()
 {
     return $this->query_result ? @ocirowcount($this->query_result) : false;
 }
开发者ID:puring0815,项目名称:OpenKore,代码行数:7,代码来源:oracle.php

示例10: foreach

     break;
 case 'Oracle':
     $db = @ocilogon($_POST['mysql_l'], $_POST['mysql_p'], $_POST['mysql_db']);
     if ($error = @ocierror()) {
         echo "<div align=center><font face=Verdana size=-2 color=red><b>Can't connect to Oracle server.<br>" . $error['message'] . "</b></font></div>";
     } else {
         $querys = @explode(';', $_POST['db_query']);
         foreach ($querys as $num => $query) {
             if (strlen($query) > 5) {
                 echo "<font face=Verdana size=-2 color=green><b>Query#" . $num . " : " . htmlspecialchars($query) . "</b></font><br>";
                 $stat = @ociparse($db, $query);
                 @ociexecute($stat);
                 if ($error = @ocierror()) {
                     echo "<table width=100%><tr><td><font face=Verdana size=-2>Error : <b>" . $error['message'] . "</b></font></td></tr></table><br>";
                 } else {
                     $rowcount = @ocirowcount($stat);
                     if ($rowcount != 0) {
                         echo "<table width=100%><tr><td><font face=Verdana size=-2>affected rows : <b>" . $rowcount . "</b></font></td></tr></table><br>";
                     } else {
                         echo "<table width=100%><tr>";
                         for ($j = 1; $j <= @ocinumcols($stat); $j++) {
                             echo "<td bgcolor=#cccccc><font face=Verdana size=-2><b>&nbsp;" . htmlspecialchars(@ocicolumnname($stat, $j)) . "&nbsp;</b></font></td>";
                         }
                         echo "</tr>";
                         while (ocifetch($stat)) {
                             echo "<tr>";
                             for ($j = 1; $j <= @ocinumcols($stat); $j++) {
                                 echo "<td><font face=Verdana size=-2>&nbsp;" . htmlspecialchars(@ociresult($stat, $j)) . "&nbsp;</font></td>";
                             }
                             echo "</tr>";
                         }
开发者ID:Theov,项目名称:webshells,代码行数:31,代码来源:r57.php

示例11: _initialize


//.........这里部分代码省略.........
                             }
                             if (strlen($hostip) > 200) {
                                 $hostip = substr($hostip, 0, 200);
                             }
                             if (strlen($act) > 200) {
                                 $act = substr($act, 0, 200);
                             }
                             //去掉回车
                             $act = strtr($act, array("\n" => null, "\r" => null));
                             if ($v['uptype'] == 'replace') {
                                 //memory_max=,memory_total, cpu_user_time_max,cpu_user_time_total,cpu_sys_time_max,cpu_sys_time_total
                                 $sql = "update {$this->report_monitor} set fun_count=:fun_count,v6=:v6, total_diff_time=:total_diff_time,\n\t\t\t\t\t\t\t\t\tmemory_max=:memory_max, memory_total=:memory_total, cpu_user_time_max=:cpu_user_time_max, cpu_user_time_total=:cpu_user_time_total, cpu_sys_time_max=:cpu_sys_time_max, cpu_sys_time_total=:cpu_sys_time_total where md5=:md5 ";
                             } else {
                                 $sql = "update {$this->report_monitor} set fun_count=fun_count+:fun_count,v6=:v6, total_diff_time=:total_diff_time,\n\t\t\t\t\t\t\t\t    memory_max=:memory_max, memory_total=:memory_total, cpu_user_time_max=:cpu_user_time_max, cpu_user_time_total=:cpu_user_time_total, cpu_sys_time_max=:cpu_sys_time_max, cpu_sys_time_total=:cpu_sys_time_total where md5=:md5 ";
                             }
                             $stmt = _ociparse($conn_db, $sql);
                             _ocibindbyname($stmt, ':md5', md5($time . $type . $host . $act . $key . $hostip));
                             _ocibindbyname($stmt, ':fun_count', $v['count']);
                             _ocibindbyname($stmt, ':v6', abs($v['diff_time']));
                             _ocibindbyname($stmt, ':total_diff_time', $v['total_diff_time']);
                             _ocibindbyname($stmt, ':memory_max', $v['memory_max']);
                             _ocibindbyname($stmt, ':memory_total', $v['memory_total']);
                             _ocibindbyname($stmt, ':cpu_user_time_max', $v['cpu_user_time_max']);
                             _ocibindbyname($stmt, ':cpu_user_time_total', $v['cpu_user_time_total']);
                             _ocibindbyname($stmt, ':cpu_sys_time_max', $v['cpu_sys_time_max']);
                             _ocibindbyname($stmt, ':cpu_sys_time_total', $v['cpu_sys_time_total']);
                             $oci_error = _ociexecute($stmt);
                             print_r($oci_error);
                             if ($oci_error) {
                                 _status(1, VHOST . "(BUG错误)", 'SQL错误', "{$get_included_files}/{$_GET['act']}", var_export(array('cal_date' => $time, 'v1' => $type, 'v2' => $host, 'v3' => $act, 'v4' => $key, 'v5' => $hostip, 'fun_count' => $v['count'], 'v6' => abs($v['diff_time']), 'total_diff_time' => $v['total_diff_time'], 'memory_max' => $v['memory_max'], 'memory_total' => $v['memory_total'], 'cpu_user_time_max' => $v['cpu_user_time_max'], 'cpu_user_time_total' => $v['cpu_user_time_total'], 'cpu_sys_time_max' => $v['cpu_sys_time_max'], 'cpu_sys_time_total' => $v['cpu_sys_time_total']), true) . "|" . var_export($oci_error, true), VIP);
                             } else {
                                 _status(1, VHOST . "(PHPAPM)", "统计消耗", $type, 'monitor(update)', VIP);
                             }
                             $_row_count = ocirowcount($stmt);
                             if (!$_row_count) {
                                 $xxi++;
                                 echo "{$xxi}:[{$time} . {$type} . {$host} . {$act} . {$key} . {$hostip}]\n";
                                 $sql = "insert into {$this->report_monitor} (id,v1,v2,v3,v4,v5,fun_count,cal_date,v6,total_diff_time,memory_max,memory_total, cpu_user_time_max,cpu_user_time_total,cpu_sys_time_max,cpu_sys_time_total,md5)\n                                    values(seq_{$this->report_monitor}.nextval,:v1,:v2,:v3,:v4,:v5,:fun_count,to_date(:cal_date,'yyyy-mm-dd hh24:mi:ss'),:v6,:total_diff_time,:memory_max,:memory_total, :cpu_user_time_max,:cpu_user_time_total,:cpu_sys_time_max,:cpu_sys_time_total,:md5)";
                                 $stmt = _ociparse($conn_db, $sql);
                                 _ocibindbyname($stmt, ':md5', md5($time . $type . $host . $act . $key . $hostip));
                                 _ocibindbyname($stmt, ':cal_date', $time);
                                 _ocibindbyname($stmt, ':v1', $type);
                                 _ocibindbyname($stmt, ':v2', $host);
                                 _ocibindbyname($stmt, ':v3', $act);
                                 _ocibindbyname($stmt, ':v4', $key);
                                 _ocibindbyname($stmt, ':v5', $hostip);
                                 _ocibindbyname($stmt, ':fun_count', $v['count']);
                                 _ocibindbyname($stmt, ':v6', abs($v['diff_time']));
                                 _ocibindbyname($stmt, ':total_diff_time', $v['total_diff_time']);
                                 _ocibindbyname($stmt, ':memory_max', $v['memory_max']);
                                 _ocibindbyname($stmt, ':memory_total', $v['memory_total']);
                                 _ocibindbyname($stmt, ':cpu_user_time_max', $v['cpu_user_time_max']);
                                 _ocibindbyname($stmt, ':cpu_user_time_total', $v['cpu_user_time_total']);
                                 _ocibindbyname($stmt, ':cpu_sys_time_max', $v['cpu_sys_time_max']);
                                 _ocibindbyname($stmt, ':cpu_sys_time_total', $v['cpu_sys_time_total']);
                                 $oci_error = _ociexecute($stmt);
                                 print_r($oci_error);
                                 if ($oci_error) {
                                     _status(1, VHOST . "(BUG错误)", 'SQL错误', "{$get_included_files}/{$_GET['act']}", var_export(array('cal_date' => $time, 'time' => date('Y-m-d H:i:s'), 'md5' => md5($time . $type . $host . $act . $key . $hostip), 'v1' => $type, 'v2' => $host, 'v3' => $act, 'v4' => $key, 'v5' => $hostip, 'fun_count' => $v['count'], 'v6' => abs($v['diff_time']), 'memory_max' => $v['memory_max'], 'memory_total' => $v['memory_total'], 'cpu_user_time_max' => $v['cpu_user_time_max'], 'cpu_user_time_total' => $v['cpu_user_time_total'], 'cpu_sys_time_max' => $v['cpu_sys_time_max'], 'cpu_sys_time_total' => $v['cpu_sys_time_total']), true) . "|" . var_export($oci_error, true), VIP);
                                 } else {
                                     _status(1, VHOST . "(PHPAPM)", "统计消耗", $type, 'monitor', VIP);
                                 }
                             }
                         }
                     }
                 }
开发者ID:sdgdsffdsfff,项目名称:phpapm,代码行数:67,代码来源:monitor.php

示例12: affectedRows

 public function affectedRows()
 {
     return ocirowcount($this->_hMaster);
 }
开发者ID:Lovinity,项目名称:EQM,代码行数:4,代码来源:oracle.class.php

示例13: db_affected_rows

/**
 *  db_affected_rows() - Returns the number of rows changed in the last query
 *
 *  @param		string	Query result set handle
 */
function db_affected_rows($qhandle)
{
    return @ocirowcount($qhandle);
}
开发者ID:neymanna,项目名称:fusionforge,代码行数:9,代码来源:database-oci8.php

示例14: affected_rows

 function affected_rows()
 {
     switch ($this->db) {
         case 'MySQL':
             return @mysql_affected_rows($this->res);
             break;
         case 'MSSQL':
             return @mssql_affected_rows($this->res);
             break;
         case 'PostgreSQL':
             return @pg_affected_rows($this->res);
             break;
         case 'Oracle':
             return @ocirowcount($this->res);
             break;
         default:
             return 0;
             break;
     }
 }
开发者ID:retanoj,项目名称:webshellSample,代码行数:20,代码来源:8445e897bf06d4ebcbdbeffb147bfab0.php

示例15: _initialize

 function _initialize()
 {
     set_time_limit(0);
     ini_set("display_errors", true);
     echo "<pre>";
     $conn_db = _ocilogon($this->db);
     if (!$conn_db) {
         return;
     }
     //每小时汇总[上小时+当前小时]
     $hourtime = strtotime(date('Y-m-d H:0:0') . " -1 hour");
     $endtime = time();
     if ($_GET['hour']) {
         $hourtime = strtotime($_GET['hour']);
         $endtime = strtotime("{$_GET['hour']} +1 day");
     }
     //所有配置信息 包含虚列
     $sql = "select * from  {$this->report_monitor_config} t  where id>0";
     $stmt = _ociparse($conn_db, $sql);
     $oci_error = _ociexecute($stmt);
     $this->all_config = $_row = array();
     while (ocifetchinto($stmt, $_row, OCI_ASSOC + OCI_RETURN_LOBS + OCI_RETURN_NULLS)) {
         $this->all_config[$_row['V1'] . $_row['V2']] = $_row;
     }
     $addwhere = null;
     if ($_GET['v1']) {
         $addwhere .= " and v1=:v1 ";
     }
     if ($_GET['v2']) {
         $addwhere .= " and v2=:v2 ";
     }
     for ($it = $hourtime; $it <= $endtime; $it += 3600) {
         $hour = date('Y-m-d H:00:00', $it);
         echo "hour:{$hour}\n";
         //每小时数据汇总memory_max,memory_total, cpu_user_time_max,cpu_user_time_total,cpu_sys_time_max,cpu_sys_time_total
         $sql = "select to_char(t.cal_date, 'yyyy-mm-dd hh24') cal_date, t.v1, decode(t.v2,null,'null',v2) v2,\n                    decode(t.v3,null,'null',v3) v3, sum(fun_count) fun_count,avg(fun_count) fun_count_avg,max(abs(nvl(v6,0))) DIFF_TIME, sum(abs(t.total_diff_time)) total_diff_time,\n                    max(memory_max) memory_max, sum(memory_total) memory_total, max(cpu_user_time_max) cpu_user_time_max,sum(cpu_user_time_total) cpu_user_time_total, max(cpu_sys_time_max) cpu_sys_time_max, sum(cpu_sys_time_total) cpu_sys_time_total\n                    from {$this->report_monitor} t\n                    where cal_date >= to_date(:hour,'yyyy-mm-dd hh24:mi:ss') and cal_date <to_date(:hour,'yyyy-mm-dd hh24:mi:ss')+1/24\n                    {$addwhere}\n                    group by t.v1, t.v2,t.v3, to_char(t.cal_date, 'yyyy-mm-dd hh24')  ";
         $stmt_list = _ociparse($conn_db, $sql);
         _ocibindbyname($stmt_list, ':hour', $hour);
         if ($_GET['v1']) {
             _ocibindbyname($stmt_list, ':v1', $_GET['v1']);
         }
         if ($_GET['v2']) {
             _ocibindbyname($stmt_list, ':v2', $_GET['v2']);
         }
         $oci_error = _ociexecute($stmt_list);
         print_r($oci_error);
         $_row = array();
         while (ocifetchinto($stmt_list, $_row, OCI_ASSOC + OCI_RETURN_LOBS + OCI_RETURN_NULLS)) {
             $_row2 = $this->all_config[$_row['V1'] . $_row['V2']];
             //正常情况下从原始表读取数据.如果是按照最后一分钟计算.走min表
             //虚列数据不进行计算
             if ($_row2['VIRTUAL_COLUMNS'] == 0) {
                 if ($_row2['HOUR_COUNT_TYPE'] == 4) {
                     $_row['FUN_COUNT'] = $_row['FUN_COUNT_AVG'];
                 }
                 $sql = "update {$this->report_monitor_hour} set fun_count=:fun_count,diff_time=:diff_time, total_diff_time=:total_diff_time,\n                memory_max=:memory_max, memory_total=:memory_total, cpu_user_time_max=:cpu_user_time_max, cpu_user_time_total=:cpu_user_time_total, cpu_sys_time_max=:cpu_sys_time_max, cpu_sys_time_total=:cpu_sys_time_total\n                where v1=:v1 and v2=:v2 and v3=:v3  and  cal_date=to_date(:cal_date,'yyyy-mm-dd hh24') ";
                 $stmt = _ociparse($conn_db, $sql);
                 _ocibindbyname($stmt, ':v1', $_row['V1']);
                 _ocibindbyname($stmt, ':v2', $_row['V2']);
                 _ocibindbyname($stmt, ':v3', $_row['V3']);
                 _ocibindbyname($stmt, ':cal_date', $_row['CAL_DATE']);
                 _ocibindbyname($stmt, ':fun_count', $_row['FUN_COUNT']);
                 _ocibindbyname($stmt, ':diff_time', abs($_row['DIFF_TIME']));
                 _ocibindbyname($stmt, ':total_diff_time', abs($_row['TOTAL_DIFF_TIME']));
                 _ocibindbyname($stmt, ':memory_max', $_row['MEMORY_MAX']);
                 _ocibindbyname($stmt, ':memory_total', $_row['MEMORY_TOTAL']);
                 _ocibindbyname($stmt, ':cpu_user_time_max', $_row['CPU_USER_TIME_MAX']);
                 _ocibindbyname($stmt, ':cpu_user_time_total', $_row['CPU_USER_TIME_TOTAL']);
                 _ocibindbyname($stmt, ':cpu_sys_time_max', $_row['CPU_SYS_TIME_MAX']);
                 _ocibindbyname($stmt, ':cpu_sys_time_total', $_row['CPU_SYS_TIME_TOTAL']);
                 $oci_error = _ociexecute($stmt);
                 print_r($oci_error);
                 _status(1, VHOST . "(PHPAPM)", "统计消耗", $_row['V1'], 'monitor_hour(update)', VIP);
                 $ocirowcount = ocirowcount($stmt);
                 if ($ocirowcount < 1) {
                     $sql = "insert into {$this->report_monitor_hour} (cal_date,v1,v2,v3,fun_count,diff_time, total_diff_time,memory_max,memory_total, cpu_user_time_max,cpu_user_time_total,cpu_sys_time_max,cpu_sys_time_total)\n                    values (to_date(:cal_date,'yyyy-mm-dd hh24'),:v1,:v2,:v3,:fun_count,:diff_time, :total_diff_time, :memory_max,:memory_total, :cpu_user_time_max,:cpu_user_time_total,:cpu_sys_time_max,:cpu_sys_time_total) ";
                     $stmt = _ociparse($conn_db, $sql);
                     _ocibindbyname($stmt, ':v1', $_row['V1']);
                     _ocibindbyname($stmt, ':v2', $_row['V2']);
                     _ocibindbyname($stmt, ':v3', $_row['V3']);
                     _ocibindbyname($stmt, ':cal_date', $_row['CAL_DATE']);
                     _ocibindbyname($stmt, ':fun_count', $_row['FUN_COUNT']);
                     _ocibindbyname($stmt, ':diff_time', abs($_row['DIFF_TIME']));
                     _ocibindbyname($stmt, ':total_diff_time', abs($_row['TOTAL_DIFF_TIME']));
                     _ocibindbyname($stmt, ':memory_max', $_row['MEMORY_MAX']);
                     _ocibindbyname($stmt, ':memory_total', $_row['MEMORY_TOTAL']);
                     _ocibindbyname($stmt, ':cpu_user_time_max', $_row['CPU_USER_TIME_MAX']);
                     _ocibindbyname($stmt, ':cpu_user_time_total', $_row['CPU_USER_TIME_TOTAL']);
                     _ocibindbyname($stmt, ':cpu_sys_time_max', $_row['CPU_SYS_TIME_MAX']);
                     _ocibindbyname($stmt, ':cpu_sys_time_total', $_row['CPU_SYS_TIME_TOTAL']);
                     $oci_error = _ociexecute($stmt);
                     print_r($oci_error);
                     if ($oci_error) {
                         $get_included_files = basename(array_shift(get_included_files()));
                         _status(1, VHOST . "(BUG错误)", 'SQL错误', $get_included_files . '/' . $_GET['act'], var_export($oci_error, true) . "|" . var_export($_row, true));
                     } else {
                         _status(1, VHOST . "(PHPAPM)", "统计消耗", $_row['V1'], 'hour', VIP);
                     }
                 }
                 //虚数列数据
//.........这里部分代码省略.........
开发者ID:sdgdsffdsfff,项目名称:phpapm,代码行数:101,代码来源:monitor_config.php


注:本文中的ocirowcount函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。