当前位置: 首页>>代码示例>>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;未经允许,请勿转载。