當前位置: 首頁>>代碼示例>>PHP>>正文


PHP mysqli_stmt::data_seek方法代碼示例

本文整理匯總了PHP中mysqli_stmt::data_seek方法的典型用法代碼示例。如果您正苦於以下問題:PHP mysqli_stmt::data_seek方法的具體用法?PHP mysqli_stmt::data_seek怎麽用?PHP mysqli_stmt::data_seek使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在mysqli_stmt的用法示例。


在下文中一共展示了mysqli_stmt::data_seek方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: query_result

 /**
  * Get result data.
  * @param int The row number from the result that's being retrieved. Row numbers start at 0.
  * @param int The offset of the field being retrieved.
  * @return array|false The contents of one cell from a MySQL result set on success, or false on failure.
  */
 public function query_result($row, $field = 0)
 {
     if (0 == $this->result->num_rows) {
         return false;
     }
     $this->result->data_seek($row);
     $datarow = $this->result->fetch_array();
     return $datarow[$field];
 }
開發者ID:mpeshev,項目名稱:wp-db-driver,代碼行數:15,代碼來源:mysqli.php

示例2: rewind

 /**
  * Rewind
  */
 public function rewind()
 {
     if ($this->position !== 0) {
         if ($this->isBuffered === false) {
             throw new Exception\RuntimeException('Unbuffered results cannot be rewound for multiple iterations');
         }
     }
     $this->resource->data_seek(0); // works for both mysqli_result & mysqli_stmt
     $this->currentComplete = false;
     $this->position = 0;
 }
開發者ID:necrogami,項目名稱:zf2,代碼行數:14,代碼來源:Result.php

示例3: rewind

 /**
  * Rewind
  * 
  */
 public function rewind()
 {
     $this->currentComplete = false;
     $this->position = 0;
     if ($this->resource instanceof \mysqli_stmt) {
         //$this->resource->reset();
     } else {
         $this->resource->data_seek(0);
         // works for both mysqli_result & mysqli_stmt
     }
 }
開發者ID:bradley-holt,項目名稱:zf2,代碼行數:15,代碼來源:Result.php

示例4: dataSeek

 /**
  * Seeks to an arbitrary row in statement result set
  * @link http://www.php.net/manual/en/mysqli-stmt.data-seek.php
  * @param offset int <p>
  * Must be between zero and the total number of rows minus one (0..
  * mysqli_stmt_num_rows - 1).
  * </p>
  * @return \classes\database\statement\MysqliPrepareStmt
  */
 public function dataSeek($offset)
 {
     $this->stmt->data_seek($offset);
     return $this;
 }
開發者ID:laiello,項目名稱:perminator,代碼行數:14,代碼來源:MysqliPrepareStmt.php

示例5: seek

 /**
  * Moves internal result pointer.
  *
  * @param int $rowNumber Where to place the result pointer (0 = start)
  * @return bool Returns TRUE on success or FALSE on failure.
  * @api
  */
 public function seek($rowNumber)
 {
     $success = $this->statement->data_seek((int) $rowNumber);
     if ($this->statement instanceof \mysqli_stmt) {
         // data_seek() does not return anything
         $success = TRUE;
     }
     return $success;
 }
開發者ID:plan2net,項目名稱:TYPO3.CMS,代碼行數:16,代碼來源:PreparedStatement.php

示例6: seek

 public function seek($row)
 {
     $this->rowNum = $row - 1;
     $this->statement->data_seek($row);
     return $this->next();
 }
開發者ID:nicocin,項目名稱:silverstripe-framework,代碼行數:6,代碼來源:MySQLStatement.php


注:本文中的mysqli_stmt::data_seek方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。