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


PHP ocifetchinto函数代码示例

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


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


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