• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ocifetchinto函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: _initialize

 function _initialize()
 {
     if (empty($_COOKIE['admin_user']) || $_COOKIE['admin_user'] != md5(serialize($this->admin_user))) {
         exit;
     }
     $conn_db = _ocilogon($this->db);
     $sql = "select t.* from {$this->report_monitor_v1} t where v1=:v1 ";
     $stmt = _ociparse($conn_db, $sql);
     _ocibindbyname($stmt, ':v1', $_REQUEST['v1']);
     $oci_error = _ociexecute($stmt);
     $this->row_config = array();
     ocifetchinto($stmt, $this->row_config, OCI_ASSOC + OCI_RETURN_LOBS + OCI_RETURN_NULLS);
     $sql = "select t.*,decode(as_name,null,v1,as_name) as_name1 from {$this->report_monitor_v1} t\n        order by decode(as_name,null,v1,as_name)  ";
     $stmt = _ociparse($conn_db, $sql);
     $oci_error = _ociexecute($stmt);
     $this->v1_config_group = $this->v1_config = $_row = array();
     while (ocifetchinto($stmt, $_row, OCI_ASSOC + OCI_RETURN_LOBS + OCI_RETURN_NULLS)) {
         $v1_config_group[$_row['GROUP_NAME_1']][$_row['GROUP_NAME_2']][$_row['GROUP_NAME']][] = $_row;
         if ($_REQUEST['v1'] == $_row['V1']) {
             $this->v1_config_act = $_row;
         }
     }
     $this->v1_config = $v1_config_group[$this->row_config['GROUP_NAME_1']][$this->row_config['GROUP_NAME_2']][$this->row_config['GROUP_NAME']];
     $sql = "select * from {$this->report_monitor_config} where v1=:v1 order by orderby ";
     $stmt = _ociparse($conn_db, $sql);
     _ocibindbyname($stmt, ':v1', $_REQUEST['v1']);
     $oci_error = _ociexecute($stmt);
     $this->all = $_row = array();
     while (ocifetchinto($stmt, $_row, OCI_ASSOC + OCI_RETURN_LOBS + OCI_RETURN_NULLS)) {
         $_row['V2_CONFIG_OTHER'] = unserialize($_row['V2_CONFIG_OTHER']);
         $this->all[] = $_row;
     }
     include PHPAPM_PATH . "./project_tpl/report_monitor_config.html";
 }
开发者ID:sdgdsffdsfff,项目名称:phpapm,代码行数:34,代码来源:report_monitor_config.php


示例2: _initialize

 function _initialize()
 {
     #每小时执行一次
     if (date('i') != 30) {
         exit;
     }
     $conn_db = _ocilogon($this->db);
     $sql = "select * from {$this->report_monitor_config} order by v1, orderby,v2 ";
     $stmt = _ociparse($conn_db, $sql);
     $oci_error = _ociexecute($stmt);
     $this->all = $_row = array();
     while (ocifetchinto($stmt, $_row, OCI_ASSOC + OCI_RETURN_LOBS + OCI_RETURN_NULLS)) {
         $this->all[$_row['V1']][] = $_row;
     }
     //排序更新初始化
     foreach ($this->all as $k => $v) {
         foreach ($v as $kk => $vv) {
             $sql = "update  {$this->report_monitor_config}  set orderby=:orderby where v1=:v1 and v2=:v2  ";
             $stmt = _ociparse($conn_db, $sql);
             //每次都独立提交,所以这样绑定(相同变量$k,$v)没问题
             _ocibindbyname($stmt, ':v1', $vv['V1']);
             _ocibindbyname($stmt, ':v2', $vv['V2']);
             _ocibindbyname($stmt, ':orderby', intval($kk + 1));
             $oci_error = _ociexecute($stmt);
         }
     }
     echo 'ok';
 }
开发者ID:sdgdsffdsfff,项目名称:phpapm,代码行数:28,代码来源:report_monitor_order.php


示例3: _initialize

 function _initialize()
 {
     #每小时执行一次
     if (date('i') != 30) {
         exit;
     }
     $conn_db = _ocilogon($this->db);
     //获取V1级别的评分要求
     $_row_infos = array();
     $sql = "select * from {$this->report_monitor_v1} t where pinfen_rule is not null ";
     $stmt_list = _ociparse($conn_db, $sql);
     $oci_error = _ociexecute($stmt_list);
     $_row = array();
     while (ocifetchinto($stmt_list, $_row, OCI_ASSOC + OCI_RETURN_LOBS + OCI_RETURN_NULLS)) {
         $_row = unserialize($_row['PINFEN_RULE']);
         if ($_row['pinfen_name'] && $_row['koufen_name'] && $_row['base_num'] && $_row['just_rule'] && $_row['pinfen_step'] && $_row['rule_num']) {
             $_row_infos[] = $_row;
         }
     }
     //获取V2级别的评分要求
     $sql = "select * from {$this->report_monitor_config} t where pinfen_rule is not null ";
     $stmt_list = _ociparse($conn_db, $sql);
     $oci_error = _ociexecute($stmt_list);
     $_row = array();
     while (ocifetchinto($stmt_list, $_row, OCI_ASSOC + OCI_RETURN_LOBS + OCI_RETURN_NULLS)) {
         $_row = unserialize($_row['PINFEN_RULE']);
         if ($_row['pinfen_name'] && $_row['koufen_name'] && $_row['base_num'] && $_row['just_rule'] && $_row['pinfen_step'] && $_row['rule_num']) {
             $_row_infos[] = $_row;
         }
     }
     print_r($_row_infos);
     foreach ($_row_infos as $_row_info) {
         if ($_row_info['v2']) {
             if ($_row_info['just_rule'] == '>') {
                 $sql = "select   case  when nvl(t.fun_count,0) > :base_num then  - round((nvl(t.fun_count,0) - :base_num) / :pinfen_step)  else  0  end as num from {$this->report_monitor_date} t where v1 = :v1  and v2 = :v2  and cal_date = trunc(sysdate) ";
             } else {
                 $sql = "select t.fun_count, case  when nvl(t.fun_count,0) < :base_num then  - round((:base_num - nvl(t.fun_count,0)) / :pinfen_step)  else  0  end as num from {$this->report_monitor_date} t where v1 = :v1   and v2 = :v2  and cal_date = trunc(sysdate) ";
             }
         } else {
             if ($_row_info['just_rule'] == '>') {
                 $sql = "select  case  when sum(nvl(t.fun_count,0)) > :base_num then  - round((  sum(nvl(t.fun_count,0)) - :base_num) / :pinfen_step)  else  0  end as num from {$this->report_monitor_date} t where v1 = :v1    and cal_date = trunc(sysdate) ";
             } else {
                 $sql = "select  case  when  sum(nvl(t.fun_count,0)) < :base_num then  - round((:base_num -  sum(nvl(t.fun_count,0)) ) / :pinfen_step)  else  0  end as num from {$this->report_monitor_date} t where v1 = :v1     and cal_date = trunc(sysdate) ";
             }
         }
         $stmt = _ociparse($conn_db, $sql);
         _ocibindbyname($stmt, ':base_num', $_row_info['base_num']);
         _ocibindbyname($stmt, ':pinfen_step', $_row_info['pinfen_step']);
         _ocibindbyname($stmt, ':v1', $_row_info['v1']);
         if ($_row_info['v2']) {
             _ocibindbyname($stmt, ':v2', $_row_info['v2']);
         }
         $oci_error = _ociexecute($stmt);
         print_r($oci_error);
         $_row_num = array();
         ocifetchinto($stmt, $_row_num, OCI_ASSOC + OCI_RETURN_LOBS + OCI_RETURN_NULLS);
         _status($_row_num['NUM'], $_row_info['pinfen_name'], $_row_info['koufen_name'], $_row_info['v1'] . "@" . $_row_info['v2']);
         print_r($_row_num);
     }
 }
开发者ID:sdgdsffdsfff,项目名称:phpapm,代码行数:60,代码来源:crontab_report_pinfen.php


示例4: insert_id

 function insert_id($table)
 {
     $sql = "SELECT max(id) ID FROM {$table}";
     $query = ociparse($this->conn, $sql);
     ociexecute($query);
     ocifetchinto($query, $row, OCI_BOTH);
     return $row[ID];
 }
开发者ID:pamcruz,项目名称:unimedjp,代码行数:8,代码来源:oracle.class.php


示例5: return

 function &_fetch()
 {
     if (ocifetchinto($this->_idResult, $row, OCI_ASSOC + OCI_RETURN_NULLS)) {
         return (object) $row;
     } else {
         return false;
     }
 }
开发者ID:BackupTheBerlios,项目名称:phpaie,代码行数:8,代码来源:CopixDbResultSet.oci8.class.php


示例6: fetchTo

 function fetchTo($offset)
 {
     if ($offset > 1) {
         for ($i = 1; $i < $offset - 1; $i++) {
             if (!ocifetchinto($this->_idResult, $row, OCI_ASSOC + OCI_RETURN_NULLS + OCI_RETURN_LOBS)) {
                 break;
             }
         }
     }
 }
开发者ID:BackupTheBerlios,项目名称:phpannu-svn,代码行数:10,代码来源:CopixDbResultSet.oci8.class.php


示例7: db_query

/**
 *  db_query() - Query the database
 *
 *  NOTE - the OCI version of this may be somewhat inefficient
 *  for large result sets (hundreds or thousands of rows selected)
 *  However - most queries are returning 25-50 rows
 *
 *  @param		string	SQL statement
 *  @param		int		How many rows do you want returned
 *  @param		int		Of matching rows, return only rows starting here
 */
function db_query($qstring, $limit = '-1', $offset = 0)
{
    global $QUERY_COUNT, $sys_db_results, $sys_db_row_pointer, $sys_db_oci_commit_mode;
    $QUERY_COUNT++;
    $stmt = @ociparse($gfconn, $qstring);
    if (!$stmt) {
        return 0;
    } else {
        if ($limit > 0) {
            if (!$offset || $offset < 0) {
                $offset = 0;
            }
        }
        $res = @ociexecute($stmt, $sys_db_oci_commit_mode);
        if (!$res) {
            return 0;
        } else {
            //if offset, seek to starting point
            //potentially expensive if large offset
            //however there is no data_seek feature AFAICT
            $more_data = true;
            if ($offset > 0) {
                for ($i = 0; $i < $offset; $i++) {
                    //burn them off
                    @ocifetchinto($res, $x);
                    if (!$x[1]) {
                        //if no data be returned
                        //get out of loop
                        $more_data = false;
                        break;
                    }
                }
            }
            $i = 0;
            while ($more_data) {
                $i++;
                @ocifetchinto($res, $x, 'OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS');
                $sys_db_results[$res][$i - 1] = $x;
                //see if data is being returned && we are
                //still within the requested $limit
                if (count($x) < 1 || $limit > 0 && $i >= $limit) {
                    $more_data = false;
                }
            }
            $sys_db_row_pointer[$res] = 0;
            return $res;
        }
    }
}
开发者ID:neymanna,项目名称:fusionforge,代码行数:60,代码来源:database-oci8.php


示例8: _initialize

 function _initialize()
 {
     if (empty($_COOKIE['admin_user']) || $_COOKIE['admin_user'] != md5(serialize($this->admin_user))) {
         exit;
     }
     if (!isset($_GET['NO_COUNT']) && !isset($_GET['DATA_UNITS']) && !isset($_GET['API_ID'])) {
         header("location:{$_SERVER['HTTP_REFERER']}");
         die;
     }
     $conn_db = _ocilogon($this->db);
     $sql = "select * from {$this->report_monitor_config} where id=:id ";
     $stmt = _ociparse($conn_db, $sql);
     _ocibindbyname($stmt, ':id', $_GET['id']);
     $oci_error = _ociexecute($stmt);
     $_row = array();
     ocifetchinto($stmt, $_row, OCI_ASSOC + OCI_RETURN_LOBS + OCI_RETURN_NULLS);
     $v2_config_other = unserialize($_row['V2_CONFIG_OTHER']);
     //修改是否参与
     if (isset($_GET['NO_COUNT'])) {
         $v2_config_other['NO_COUNT'] = $_GET['NO_COUNT'] == 'true' ? true : false;
     }
     //修改数据单位
     if (isset($_GET['DATA_UNITS'])) {
         if ($_GET['DATA_UNITS'] == 'capacity') {
             $v2_config_other['DATA_UNITS'] = 'capacity';
         } elseif ($_GET['DATA_UNITS'] == 'digital') {
             unset($v2_config_other['DATA_UNITS']);
         }
     }
     //修改对应api id
     if (isset($_GET['API_ID'])) {
         if (is_numeric($_GET['API_ID'])) {
             $v2_config_other['API_ID'] = $_GET['API_ID'];
         }
     }
     $v2_config_other = serialize($v2_config_other);
     $sql = "update {$this->report_monitor_config} set v2_config_other=:v2_config_other where id=:id ";
     $stmt = _ociparse($conn_db, $sql);
     _ocibindbyname($stmt, ':v2_config_other', $v2_config_other);
     _ocibindbyname($stmt, ':id', $_GET['id']);
     $oci_error = _ociexecute($stmt);
     if (!$v2_config_other['API_ID']) {
         header("location:{$_SERVER['HTTP_REFERER']}");
     }
     die;
 }
开发者ID:sdgdsffdsfff,项目名称:phpapm,代码行数:46,代码来源:report_monitor_config_other.php


示例9: _initialize

 function _initialize()
 {
     if (empty($_COOKIE['admin_user']) || $_COOKIE['admin_user'] != md5(serialize($this->admin_user))) {
         exit;
     }
     $conn_db = _ocilogon($this->db);
     $sql = "select * from {$this->report_monitor_config} where id=:id ";
     $stmt = _ociparse($conn_db, $sql);
     _ocibindbyname($stmt, ':id', $_POST['id']);
     $oci_error = _ociexecute($stmt);
     $_row = array();
     ocifetchinto($stmt, $_row, OCI_ASSOC + OCI_RETURN_LOBS + OCI_RETURN_NULLS);
     $sql = "update {$this->report_monitor_config} set as_name=:as_name where v2=:v2  ";
     $stmt = _ociparse($conn_db, $sql);
     _ocibindbyname($stmt, ':as_name', $_POST['as_name']);
     _ocibindbyname($stmt, ':v2', $_row['V2']);
     $oci_error = _ociexecute($stmt);
 }
开发者ID:sdgdsffdsfff,项目名称:phpapm,代码行数:18,代码来源:report_monitor_as_name.php


示例10: fetchArray

 function fetchArray($r = 0, $t = 0)
 {
     if (!$r) {
         $r = $this->lastResult;
     }
     if (!$t) {
         $t = OCI_ASSOC + OCI_RETURN_NULLS + OCI_RETURN_LOBS;
     }
     $res = ocifetchinto($r, $temp, $t);
     if (is_array($temp)) {
         while (list($k, $v) = each($temp)) {
             $x = strtolower($k);
             $row[$x] = $v;
         }
     } else {
         $row = 0;
     }
     return $row;
 }
开发者ID:techczech,项目名称:tuit,代码行数:19,代码来源:driver-oci8.inc.php


示例11: _initialize

 function _initialize()
 {
     $conn_db = _ocilogon($this->db);
     $this->pageObj = new page(10000, 100);
     if ($_REQUEST['fun_host'] == '汇总') {
         $sql = "select FUN_COUNT,v3 v4  from {$this->report_monitor_hour} t where v1=:v1 and v2=:v2  and cal_date=to_date(:cal_date,'yyyy-mm-dd hh24:mi:ss') order by FUN_COUNT desc  ";
         $stmt = _ociparse($conn_db, "{$this->pageObj->num_1} {$sql} {$this->pageObj->num_3}");
         _ocibindbyname($stmt, ':v1', $_REQUEST['fun_type']);
         _ocibindbyname($stmt, ':v2', $_REQUEST['fun_act']);
         _ocibindbyname($stmt, ':num_1', intval($this->pageObj->limit_1));
         _ocibindbyname($stmt, ':num_3', intval($this->pageObj->limit_3));
         _ocibindbyname($stmt, ':cal_date', $_REQUEST['cal_date']);
         $oci_error = _ociexecute($stmt);
         $_row = array();
         $monitor_more = array();
         while (ocifetchinto($stmt, $_row, OCI_ASSOC + OCI_RETURN_LOBS + OCI_RETURN_NULLS)) {
             $monitor_more[] = $_row;
         }
     } else {
         if ($_REQUEST['fun_act']) {
             $sql = "select * from {$this->report_monitor} where v1=:v1 and v2=:v2 and  v3=:v3 and cal_date=to_date(:cal_date,'yyyy-mm-dd hh24:mi:ss') order by FUN_COUNT desc ";
         } else {
             $sql = "select * from {$this->report_monitor} where v1=:v1 and v2=:v2 and v3 is null and cal_date=to_date(:cal_date,'yyyy-mm-dd hh24:mi:ss') order by FUN_COUNT desc ";
         }
         $stmt = _ociparse($conn_db, "{$this->pageObj->num_1} {$sql} {$this->pageObj->num_3}");
         _ocibindbyname($stmt, ':v1', $_REQUEST['fun_type']);
         _ocibindbyname($stmt, ':v2', $_REQUEST['fun_host']);
         _ocibindbyname($stmt, ':num_1', intval($this->pageObj->limit_1));
         _ocibindbyname($stmt, ':num_3', intval($this->pageObj->limit_3));
         if ($_REQUEST['fun_act']) {
             _ocibindbyname($stmt, ':v3', $_REQUEST['fun_act']);
         }
         _ocibindbyname($stmt, ':cal_date', $_REQUEST['cal_date']);
         $oci_error = _ociexecute($stmt);
         $_row = array();
         $monitor_more = array();
         while (ocifetchinto($stmt, $_row, OCI_ASSOC + OCI_RETURN_LOBS + OCI_RETURN_NULLS)) {
             $monitor_more[] = $_row;
         }
     }
     include PHPAPM_PATH . "./project_tpl/report_monitor_more.html";
 }
开发者ID:sdgdsffdsfff,项目名称:phpapm,代码行数:42,代码来源:report_monitor_more.php


示例12: _initialize

 function _initialize()
 {
     #每小时执行一次,每天6点执行
     if (date('i') != 30 && date('H') != 6) {
         exit;
     }
     $date = date('Y-m-d', time() - 3600 * 24);
     $conn_db = _ocilogon($this->db);
     $sql = "select v1, v2, v2_config_other from {$this->report_monitor_config} where v2_config_other like '%stats_flag%'";
     $stmt = _ociparse($conn_db, $sql);
     $_row = array();
     $error = _ociexecute($stmt);
     print_r($error);
     while (ocifetchinto($stmt, $_row, OCI_ASSOC + OCI_RETURN_LOBS + OCI_RETURN_NULLS)) {
         print_r($_row);
         $_row['V2_CONFIG_OTHER'] = unserialize($_row['V2_CONFIG_OTHER']);
         $stats_flag = $_row['V2_CONFIG_OTHER']['stats_flag'];
         $this->_get_stats_flag_data($conn_db, $_row['V1'], $_row['V2'], $stats_flag, $date);
     }
     echo 'ok';
 }
开发者ID:sdgdsffdsfff,项目名称:phpapm,代码行数:21,代码来源:P1D_ClickStats.php


示例13: _initialize

 function _initialize()
 {
     if (empty($_COOKIE['admin_user']) || $_COOKIE['admin_user'] != md5(serialize($this->admin_user))) {
         exit;
     }
     $conn_db = _ocilogon($this->db);
     $sql = "select * from {$this->report_monitor_config} where id=:id";
     $stmt = _ociparse($conn_db, $sql);
     _ocibindbyname($stmt, ':id', $_POST['id']);
     $oci_error = _ociexecute($stmt);
     $_row = array();
     ocifetchinto($stmt, $_row, OCI_ASSOC + OCI_RETURN_LOBS + OCI_RETURN_NULLS);
     $v2_config_other = unserialize($_row['V2_CONFIG_OTHER']);
     $v2_config_other['stats_flag'] = $_POST['stats_flag'];
     if (empty($_POST['stats_flag'])) {
         unset($v2_config_other['stats_flag']);
     }
     $v2_config_other = serialize($v2_config_other);
     $sql = "update {$this->report_monitor_config} set v2_config_other=:v2_config_other where v2=:v2";
     $stmt = _ociparse($conn_db, $sql);
     _ocibindbyname($stmt, ':v2_config_other', $v2_config_other);
     _ocibindbyname($stmt, ':v2', $_row['V2']);
     $oci_error = _ociexecute($stmt);
 }
开发者ID:sdgdsffdsfff,项目名称:phpapm,代码行数:24,代码来源:report_monitor_stats_flag.php


示例14: _sql_report

 /**
  * Build db-specific report
  * @access private
  */
 function _sql_report($mode, $query = '')
 {
     switch ($mode) {
         case 'start':
             $html_table = false;
             // Grab a plan table, any will do
             $sql = "SELECT table_name\n\t\t\t\t\tFROM USER_TABLES\n\t\t\t\t\tWHERE table_name LIKE '%PLAN_TABLE%'";
             $stmt = ociparse($this->db_connect_id, $sql);
             ociexecute($stmt);
             $result = array();
             if (ocifetchinto($stmt, $result, OCI_ASSOC + OCI_RETURN_NULLS)) {
                 $table = $result['TABLE_NAME'];
                 // This is the statement_id that will allow us to track the plan
                 $statement_id = substr(md5($query), 0, 30);
                 // Remove any stale plans
                 $stmt2 = ociparse($this->db_connect_id, "DELETE FROM {$table} WHERE statement_id='{$statement_id}'");
                 ociexecute($stmt2);
                 ocifreestatement($stmt2);
                 // Explain the plan
                 $sql = "EXPLAIN PLAN\n\t\t\t\t\t\tSET STATEMENT_ID = '{$statement_id}'\n\t\t\t\t\t\tFOR {$query}";
                 $stmt2 = ociparse($this->db_connect_id, $sql);
                 ociexecute($stmt2);
                 ocifreestatement($stmt2);
                 // Get the data from the plan
                 $sql = "SELECT operation, options, object_name, object_type, cardinality, cost\n\t\t\t\t\t\tFROM plan_table\n\t\t\t\t\t\tSTART WITH id = 0 AND statement_id = '{$statement_id}'\n\t\t\t\t\t\tCONNECT BY PRIOR id = parent_id\n\t\t\t\t\t\t\tAND statement_id = '{$statement_id}'";
                 $stmt2 = ociparse($this->db_connect_id, $sql);
                 ociexecute($stmt2);
                 $row = array();
                 while (ocifetchinto($stmt2, $row, OCI_ASSOC + OCI_RETURN_NULLS)) {
                     $html_table = $this->sql_report('add_select_row', $query, $html_table, $row);
                 }
                 ocifreestatement($stmt2);
                 // Remove the plan we just made, we delete them on request anyway
                 $stmt2 = ociparse($this->db_connect_id, "DELETE FROM {$table} WHERE statement_id='{$statement_id}'");
                 ociexecute($stmt2);
                 ocifreestatement($stmt2);
             }
             ocifreestatement($stmt);
             if ($html_table) {
                 $this->html_hold .= '</table>';
             }
             break;
         case 'fromcache':
             $endtime = explode(' ', microtime());
             $endtime = $endtime[0] + $endtime[1];
             $result = @ociparse($this->db_connect_id, $query);
             $success = @ociexecute($result, OCI_DEFAULT);
             $row = array();
             while (@ocifetchinto($result, $row, OCI_ASSOC + OCI_RETURN_NULLS)) {
                 // Take the time spent on parsing rows into account
             }
             @ocifreestatement($result);
             $splittime = explode(' ', microtime());
             $splittime = $splittime[0] + $splittime[1];
             $this->sql_report('record_fromcache', $query, $endtime, $splittime);
             break;
     }
 }
开发者ID:puring0815,项目名称:OpenKore,代码行数:62,代码来源:oracle.php


示例15: while

 while ($row3 = oci_fetch_array($sth3)) {
     //echo "<div>", $row['TITLE'], "</div>";
     $packageId = $row3['PACKAGE_ID'];
 }
 if (is_null($row1['CURRENT1']) && !is_null($packageId)) {
     // SIMILIAR PACKAGE
     // nav back to create package
     echo '<script type="text/javascript">';
     echo 'alert("YOU HAVE CREATED THE SAME KIND OF PACKAGE!");';
     echo 'window.location.href = "myProjectView.php";';
     echo '</script>';
 } else {
     $sql2 = "SELECT FUNDING_GOAL FROM Projects WHERE project_id={$project_id}";
     $sth2 = oci_parse($dbh, $sql2);
     oci_execute($sth2, OCI_DEFAULT);
     while (ocifetchinto($sth2, $row2, OCI_ASSOC + OCI_RETURN_NULLS)) {
         $maxGoal = $row2['FUNDING_GOAL'];
     }
     if ($maxGoal < $currentFund + $amount * $max_count) {
         echo '<script type="text/javascript">';
         echo 'alert("YOU HAVE EXCEEDED THE FUNDING GOAL!");';
         echo 'window.location.href = "myProjectView.php";';
         echo '</script>';
     } else {
         //not similiar package
         // prepare
         $sql = "insert into package ( project_id, amount, max_count, package_reward)  values ( :project_id, :amount, :max_count, :package_reward)";
         $sth = oci_parse($dbh, $sql);
         // execute
         //oci_bind_by_name($sth, ':package_id', $package_id);
         oci_bind_by_name($sth, ':project_id', $project_id);
开发者ID:ronaldkan,项目名称:CS2102,代码行数:31,代码来源:doCreatePackage.php


示例16: getRecords

 /**
  *	This function will execute the SQL statement and return the records as an associative array.
  *
  *	@param $sql	The SQL statement to use.
  *
  *	@returns	The records matching the SQL statement as an associative array.
  */
 function getRecords($sql)
 {
     $result = $this->_connectAndExec($sql);
     $dataset = array();
     while (ocifetchinto($result, $line, OCI_ASSOC)) {
         array_push($dataset, $this->_lowerKeyNames($line));
     }
     OCIFreeStatement($result);
     return $dataset;
 }
开发者ID:BackupTheBerlios,项目名称:ydframework-svn,代码行数:17,代码来源:YDDatabaseDriver_oracle.php


示例17: DBfetch

function DBfetch(&$cursor)
{
    global $DB;
    $result = false;
    if (isset($DB['DB']) && !empty($DB['DB'])) {
        switch ($DB['TYPE']) {
            case 'MYSQL':
                $result = mysql_fetch_assoc($cursor);
                break;
            case 'POSTGRESQL':
                $result = pg_fetch_assoc($cursor);
                break;
            case 'ORACLE':
                if (ocifetchinto($cursor, $row, OCI_ASSOC + OCI_RETURN_NULLS)) {
                    $result = array();
                    foreach ($row as $key => $value) {
                        $result[strtolower($key)] = str_in_array(strtolower(ocicolumntype($cursor, $key)), array('varchar', 'varchar2', 'blob', 'clob')) && is_null($value) ? '' : $value;
                    }
                }
                break;
            case 'SQLITE3':
                if ($cursor) {
                    $result = array_shift($cursor);
                    if (is_null($result)) {
                        $result = false;
                    }
                }
                break;
        }
    }
    return $result;
}
开发者ID:rennhak,项目名称:zabbix,代码行数:32,代码来源:db.inc.php


示例18: _fetch_assoc

 /**
  * Result - associative array
  *
  * Returns the result set as an array
  *
  * @access  private
  * @return  array
  */
 function _fetch_assoc(&$row)
 {
     // if pulling from a cursor, use curs_id
     if ($this->curs_id) {
         return ocifetchinto($this->curs_id, $row, OCI_ASSOC + OCI_RETURN_NULLS);
     } else {
         return ocifetchinto($this->stmt_id, $row, OCI_ASSOC + OCI_RETURN_NULLS);
     }
 }
开发者ID:Calico90,项目名称:codeigniter-version-scan,代码行数:17,代码来源:DB_oci8.php


示例19: querY

function querY($type, $host, $user, $pass, $db = '', $query)
{
    $res = '';
    switch ($type) {
        case 'MySQL':
            if (!function_exists('mysql_connect')) {
                return 0;
            }
            $link = mysql_connect($host, $user, $pass);
            if ($link) {
                if (!empty($db)) {
                    mysql_select_db($db, $link);
                }
                $result = mysql_query($query, $link);
                while ($data = mysql_fetch_row($result)) {
                    $res .= implode('|-|-|-|-|-|', $data) . '|+|+|+|+|+|';
                }
                $res .= '[+][+][+]';
                for ($i = 0; $i < mysql_num_fields($result); $i++) {
                    $res .= mysql_field_name($result, $i) . '[-][-][-]';
                }
                mysql_close($link);
                return $res;
            }
            break;
        case 'MSSQL':
            if (!function_exists('mssql_connect')) {
                return 0;
            }
            $link = mssql_connect($host, $user, $pass);
            if ($link) {
                if (!empty($db)) {
                    mssql_select_db($db, $link);
                }
                $result = mssql_query($query, $link);
                while ($data = mssql_fetch_row($result)) {
                    $res .= implode('|-|-|-|-|-|', $data) . '|+|+|+|+|+|';
                }
                $res .= '[+][+][+]';
                for ($i = 0; $i < mssql_num_fields($result); $i++) {
                    $res .= mssql_field_name($result, $i) . '[-][-][-]';
                }
                mssql_close($link);
                return $res;
            }
            break;
        case 'Oracle':
            if (!function_exists('ocilogon')) {
                return 0;
            }
            $link = ocilogon($user, $pass, $db);
            if ($link) {
                $stm = ociparse($link, $query);
                ociexecute($stm, OCI_DEFAULT);
                while ($data = ocifetchinto($stm, $data, OCI_ASSOC + OCI_RETURN_NULLS)) {
                    $res .= implode('|-|-|-|-|-|', $data) . '|+|+|+|+|+|';
                }
                $res .= '[+][+][+]';
                for ($i = 0; $i < oci_num_fields($stm); $i++) {
                    $res .= oci_field_name($stm, $i) . '[-][-][-]';
                }
                return $res;
            }
            break;
        case 'PostgreSQL':
            if (!function_exists('pg_connect')) {
                return 0;
            }
            $link = pg_connect("host={$host} dbname={$db} user={$user} password={$pass}");
            if ($link) {
                $result = pg_query($link, $query);
                while ($data = pg_fetch_row($result)) {
                    $res .= implode('|-|-|-|-|-|', $data) . '|+|+|+|+|+|';
                }
                $res .= '[+][+][+]';
                for ($i = 0; $i < pg_num_fields($result); $i++) {
                    $res .= pg_field_name($result, $i) . '[-][-][-]';
                }
                pg_close($link);
                return $res;
            }
            break;
    }
    return 0;
}
开发者ID:retanoj,项目名称:webshellSample,代码行数:85,代码来源:a824680ae0452cb5a0bebc0e8bf858f4.php


示例20: advanceRow

 /**
  * Advances the current row position.
  * Advances the current row position. If there are no more rows left, then
  * it returns <code>false</code>.
  * @access public
  * @return boolean True, if successful; False, otherwise.
  */
 function advanceRow()
 {
     // if no rows left, cannot advance
     if (!$this->hasMoreRows()) {
         return false;
     }
     // now, advance
     $this->_currentRowIndex++;
     ocifetchinto($this->_resourceId, $this->_currentRow[BOTH], OCI_NUM + OCI_ASSOC + OCI_RETURN_LOBS);
     foreach ($this->_currentRow[BOTH] as $key => $value) {
         if (is_int($key)) {
             $this->_currentRow[NUMERIC][$key] = $value;
         } else {
             $this->_currentRow[ASSOC][$key] = $value;
         }
     }
     return true;
 }
开发者ID:adamfranco,项目名称:harmoni,代码行数:25,代码来源:OracleSelectQueryResult.class.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ocifetchstatement函数代码示例发布时间:2022-05-15
下一篇:
PHP ociexecute函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap