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


PHP mysqli_result::fetch_field方法代碼示例

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


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

示例1: bind

 /**
  * Binds this statement to the variables
  */
 protected function bind()
 {
     $variables = array();
     // Bind each field
     while ($field = $this->metadata->fetch_field()) {
         $this->columns[] = $field->name;
         // Note that while boundValues isn't initialised at this point,
         // later calls to $this->statement->fetch() Will populate
         // $this->boundValues later with the next result.
         $variables[] =& $this->boundValues[$field->name];
     }
     call_user_func_array(array($this->statement, 'bind_result'), $variables);
     $this->bound = true;
     $this->metadata->free();
     // Buffer all results
     $this->statement->store_result();
 }
開發者ID:nicocin,項目名稱:silverstripe-framework,代碼行數:20,代碼來源:MySQLStatement.php

示例2: fetchPerTable

 /**
  * Fetch a result row as an associative array, group per table
  * 
  * @param int $opt  Additional options as binary list
  * @return array
  */
 public function fetchPerTable($opt = 0)
 {
     $values = array();
     $row = $this->native->fetch_row();
     if (!isset($row)) {
         return null;
     }
     $this->native->field_seek(0);
     while ($field = $this->native->fetch_field()) {
         list(, $values[$field->table][$field->name]) = each($row);
     }
     return $values;
 }
開發者ID:jasny,項目名稱:Q,代碼行數:19,代碼來源:Result.php

示例3: getResult

 public function getResult($row = 0, $field = 0)
 {
     $this->result->data_seek($row);
     $this->result->field_seek($field);
     return $this->result->fetch_field();
 }
開發者ID:colibri-fw,項目名稱:database,代碼行數:6,代碼來源:MySQL.php


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