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


PHP odbc_next_result函数代码示例

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


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

示例1: rds_fetch_array

 public function rds_fetch_array(&$result)
 {
     //	return odbc_fetch_array($result);
     return odbc_next_result($result);
     /*$i=0;
     		while($ligne = odbc_fetch_row($result))
     		{
     			$i++;	
     		}
     		
     		if($i == 0)return -1;
     		else return $i;*/
 }
开发者ID:bubaigcect,项目名称:magictree,代码行数:13,代码来源:class_odbc.php

示例2: nextResult

 /**
  * Move the internal odbc result pointer to the next available result
  *
  * @param a valid fbsql result resource
  *
  * @access public
  *
  * @return true if a result is available otherwise return false
  */
 function nextResult($result)
 {
     return @odbc_next_result($result);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:13,代码来源:odbc.php

示例3: killProcesses

 public function killProcesses()
 {
     $conn = $this->connect();
     $result = [];
     $res = odbc_exec($conn, "SHOW TRANSACTIONS;");
     if ($res) {
         while ($row = odbc_fetch_array($res)) {
             $result[] = $row;
         }
     }
     odbc_next_result($res);
     odbc_free_result($res);
     /*
     * not really working, unfortunately
     *
     * array (size=1)
       0 =>
         array (size=6)
           'id' => string '1465827617822' (length=13)
           'user' => string 'sapi_workspace_38' (length=17)
           'session' => string '652836219206' (length=12)
           'name' => string '876af646-61c8-4a2d-83a2-00f757ad1912' (length=36)
           'started_on' => string '2016-06-13 14:20:17.822000' (length=26)
           'state' => string 'running' (length=7)
     
     string 'SELECT SYSTEM$ABORT_TRANSACTION(1465827617822);' (length=47)
     
     array (size=1)
       'SYSTEM$ABORT_TRANSACTION(1465827617822)' => string 'Could not abort txn: 1465827617822' (length=34)
     
     *
     *
     * deleting credentials/whole workspace works like a charm though
     *
     */
     foreach ($result as $transaction) {
         try {
             odbc_exec($conn, 'SELECT SYSTEM$ABORT_TRANSACTION(' . $transaction['id'] . ');');
         } catch (\Exception $e) {
             // ignore
         }
     }
     odbc_close($conn);
 }
开发者ID:keboola,项目名称:provisioning-bundle,代码行数:44,代码来源:Snowflake.php

示例4: execute

 function execute($Procedure, $RS = 0)
 {
     $this->Query_ID = $this->query($Procedure);
     if ($this->Query_ID) {
         for ($i = 0; $i < $RS; $i++) {
             odbc_next_result($this->Query_ID);
         }
     }
     return $this->Query_ID;
 }
开发者ID:Okwori,项目名称:iRadiology,代码行数:10,代码来源:db_odbc.php

示例5: while

                } else {
                    $sql_update_old_comments = "\n          UPDATE Content SET\n            content_title = ?,\n            content_value = ?,\n            content_creation_time = ?,\n            content_createdby_user_key = -2,\n            content_edited_time = ?,\n            content_editedby_user_key = -2,\n            content_deleted = FALSE\n          WHERE content_key = ?;\n        ";
                    if (!($stmt_update_comment = $mysqli_connection->prepare($sql_update_old_comments))) {
                        echo "Prepare failed: (" . $mysqli_connection->errno . ") " . $mysqli_connection->error;
                    } else {
                        $stmt_update_comment->bind_param('ssssi', $row["content_title"], $row["content_value"], $row["creation_time"], $content_edited_time, $row["content_key"]);
                        if (!$stmt_update_comment->execute()) {
                            echo "Execute failed: (" . $stmt_update_comment->errno . ") " . $stmt_update_comment->error;
                        } else {
                            echo "updated {$row['content_title']}<br/>";
                        }
                    }
                }
            }
        }
    } while (odbc_next_result($mssql_result));
    // report no updates
    echo "<br/>";
    if (empty($sql_insert_new_comments)) {
        echo "no new comments<br/><br/>";
    }
    if (empty($sql_update_old_comments)) {
        echo "no updated comments<br/><br/>";
    }
    if (empty($sql_delete_old_comments)) {
        echo "no deleted comments<br/><br/>";
    }
    // close
    odbc_close_all();
} else {
    // help connecting to database
开发者ID:admonkey,项目名称:projects.uark.edu,代码行数:31,代码来源:deltaprime.php

示例6: _sql_report

 /**
  * Build db-specific report
  * @access: private
  */
 function _sql_report($mode, $query = '')
 {
     switch ($mode) {
         case 'start':
             $explain_query = $query;
             if (preg_match('/UPDATE ([a-z0-9_]+).*?WHERE(.*)/s', $query, $m)) {
                 $explain_query = 'SELECT * FROM ' . $m[1] . ' WHERE ' . $m[2];
             } else {
                 if (preg_match('/DELETE FROM ([a-z0-9_]+).*?WHERE(.*)/s', $query, $m)) {
                     $explain_query = 'SELECT * FROM ' . $m[1] . ' WHERE ' . $m[2];
                 }
             }
             if (preg_match('/^SELECT/', $explain_query)) {
                 $html_table = false;
                 @odbc_exec($this->db_connect_id, "SET SHOWPLAN_TEXT ON;");
                 if ($result = @odbc_exec($this->db_connect_id, $explain_query)) {
                     @odbc_next_result($result);
                     while ($row = @odbc_fetch_array($result)) {
                         $html_table = $this->sql_report('add_select_row', $query, $html_table, $row);
                     }
                 }
                 @odbc_exec($this->db_connect_id, "SET SHOWPLAN_TEXT OFF;");
                 @odbc_free_result($result);
                 if ($html_table) {
                     $this->html_hold .= '</table>';
                 }
             }
             break;
         case 'fromcache':
             $endtime = explode(' ', microtime());
             $endtime = $endtime[0] + $endtime[1];
             $result = @odbc_exec($this->db_connect_id, $query);
             while ($void = @odbc_fetch_array($result)) {
                 // Take the time spent on parsing rows into account
             }
             @odbc_free_result($result);
             $splittime = explode(' ', microtime());
             $splittime = $splittime[0] + $splittime[1];
             $this->sql_report('record_fromcache', $query, $endtime, $splittime);
             break;
     }
 }
开发者ID:yunsite,项目名称:gloryroad,代码行数:46,代码来源:mssql_odbc.php

示例7: nextResult

 /**
  * Move the internal result pointer to the next available result
  *
  * @return true on success, false if there is no more result set or an error object on failure
  * @access public
  */
 function nextResult()
 {
     if ($this->result === false) {
         return $this->db->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null, 'resultset has already been freed', __FUNCTION__);
     } elseif (is_null($this->result)) {
         return false;
     }
     return odbc_next_result($this->result);
 }
开发者ID:MusicalAPP,项目名称:gfk-api-spotify-itunes,代码行数:15,代码来源:odbc.php


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