• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP fbsql_fetch_array函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: _fetch

 function _fetch($ignore_fields = false)
 {
     $this->fields = @fbsql_fetch_array($this->_queryID, $this->fetchMode);
     return $this->fields == true;
 }
开发者ID:BackupTheBerlios,项目名称:facturaphp-svn,代码行数:5,代码来源:adodb-fbsql.inc.php


示例2: fetchInto

 /**
  * Places a row from the result set into the given array
  *
  * Formating of the array and the data therein are configurable.
  * See DB_result::fetchInto() for more information.
  *
  * This method is not meant to be called directly.  Use
  * DB_result::fetchInto() instead.  It can't be declared "protected"
  * because DB_result is a separate object.
  *
  * @param resource $result    the query result resource
  * @param array    $arr       the referenced array to put the data in
  * @param int      $fetchmode how the resulting array should be indexed
  * @param int      $rownum    the row number to fetch (0 = first row)
  *
  * @return mixed  DB_OK on success, NULL when the end of a result set is
  *                 reached or on failure
  *
  * @see DB_result::fetchInto()
  */
 function fetchInto($result, &$arr, $fetchmode, $rownum = null)
 {
     if ($rownum !== null) {
         if (!@fbsql_data_seek($result, $rownum)) {
             return null;
         }
     }
     if ($fetchmode & DB_FETCHMODE_ASSOC) {
         $arr = @fbsql_fetch_array($result, FBSQL_ASSOC);
         if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE && $arr) {
             $arr = array_change_key_case($arr, CASE_LOWER);
         }
     } else {
         $arr = @fbsql_fetch_row($result);
     }
     if (!$arr) {
         return null;
     }
     if ($this->options['portability'] & DB_PORTABILITY_RTRIM) {
         $this->_rtrimArrayValues($arr);
     }
     if ($this->options['portability'] & DB_PORTABILITY_NULL_TO_EMPTY) {
         $this->_convertNullArrayValuesToEmpty($arr);
     }
     return DB_OK;
 }
开发者ID:roojs,项目名称:pear,代码行数:46,代码来源:fbsql.php


示例3: convertResource

 protected function convertResource($resource)
 {
     $resourceType = get_resource_type($resource);
     switch ($resourceType) {
         #case 'dbm':
         #case 'dba':
         #case 'dbase':
         #case 'domxml attribute':
         #case 'domxml document':
         #case 'domxml node':
         case 'fbsql result':
             $rows = array();
             $indexType = $this->dbResultIndexType == 'ASSOC' ? FBSQL_ASSOC : FBSQL_NUM;
             while ($row = fbsql_fetch_array($resource, $indexType)) {
                 array_push($rows, $row);
             }
             return $rows;
             #case 'gd': #return base64
         #case 'gd': #return base64
         case 'msql query':
             $rows = array();
             $indexType = $this->dbResultIndexType == 'ASSOC' ? MSQL_ASSOC : MSQL_NUM;
             while ($row = msql_fetch_array($resource, $indexType)) {
                 array_push($rows, $row);
             }
             return $rows;
         case 'mssql result':
             $rows = array();
             $indexType = $this->dbResultIndexType == 'ASSOC' ? MSSQL_ASSOC : MSSQL_NUM;
             while ($row = mssql_fetch_array($resource, $indexType)) {
                 array_push($rows, $row);
             }
             return $rows;
         case 'mysql result':
             $rows = array();
             $indexType = $this->dbResultIndexType == 'ASSOC' ? MYSQL_ASSOC : MYSQL_NUM;
             while ($row = mysql_fetch_array($resource, $indexType)) {
                 array_push($rows, $row);
             }
             return $rows;
         case 'odbc result':
             $rows = array();
             if ($this->dbResultIndexType == 'ASSOC') {
                 while ($row = odbc_fetch_array($resource)) {
                     array_push($rows, $row);
                 }
             } else {
                 while ($row = odbc_fetch_row($resource)) {
                     array_push($rows, $row);
                 }
             }
             return $rows;
             #case 'pdf document':
         #case 'pdf document':
         case 'pgsql result':
             $rows = array();
             $indexType = $this->dbResultIndexType == 'ASSOC' ? PGSQL_ASSOC : PGSQL_NUM;
             while ($row = pg_fetch_array($resource, $indexType)) {
                 array_push($rows, $row);
             }
             return $rows;
         case 'stream':
             return stream_get_contents($resource);
         case 'sybase-db result':
         case 'sybase-ct result':
             $rows = array();
             if ($this->dbResultIndexType == 'ASSOC') {
                 while ($row = sybase_fetch_assoc($resource)) {
                     array_push($rows, $row);
                 }
             } else {
                 while ($row = sybase_fetch_row($resource)) {
                     array_push($rows, $row);
                 }
             }
             return $rows;
             #case 'xml':
         #case 'xml':
         default:
             trigger_error("Unable to return resource type '{$resourceType}'.");
     }
 }
开发者ID:esironal,项目名称:crossui,代码行数:82,代码来源:RPCServer.class.php


示例4: fetchInto

 /**
  * Fetch a row and insert the data into an existing array.
  *
  * @param $result fbsql result identifier
  * @param $arr (reference) array where data from the row is stored
  * @param $fetchmode how the array data should be indexed
  * @param   $rownum the row number to fetch
  * @access public
  *
  * @return int DB_OK on success, a DB error on failure
  */
 function fetchInto($result, &$arr, $fetchmode, $rownum = null)
 {
     if ($rownum !== null) {
         if (!@fbsql_data_seek($result, $rownum)) {
             return null;
         }
     }
     if ($fetchmode & DB_FETCHMODE_ASSOC) {
         $arr = @fbsql_fetch_array($result, FBSQL_ASSOC);
     } else {
         $arr = @fbsql_fetch_row($result);
     }
     if (!$arr) {
         $errno = @fbsql_errno($this->connection);
         if (!$errno) {
             return NULL;
         }
         return $this->fbsqlRaiseError($errno);
     }
     return DB_OK;
 }
开发者ID:BackupTheBerlios,项目名称:e-maku-svn,代码行数:32,代码来源:fbsql.php


示例5: mysqli_select_db

<?php

include "linkpass.php";
mysqli_select_db($link, "donor");
$result = mysqli_query($link, "SELECT idno, name from donor") or die("<br>Invalid query: " . mysqli_error($link));
//This is called a front based function
while ($row = fbsql_fetch_array($result)) {
    echo "<p>ID = " . $row["idno"] . ", NAME = " . $row["name"] . "<br>";
    echo "ID = " . $row[0] . ", NAME = " . $row[1] . "</p>";
}
?>

开发者ID:ektagupta30,项目名称:SqlAssignments,代码行数:11,代码来源:connect5donor2ok.php


示例6: fetchArray

 public function fetchArray()
 {
     if (!empty($this->query)) {
         return fbsql_fetch_array($this->query);
     } else {
         return false;
     }
 }
开发者ID:Allopa,项目名称:ZN-Framework-Starter,代码行数:8,代码来源:FbsqlDriver.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP fbsql_fetch_row函数代码示例发布时间:2022-05-15
下一篇:
PHP fbsql_error函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap