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

PHP fbsql_data_seek函数代码示例

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

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



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

示例1: pgsqlAdapter

 /**
  * Constructor method for the adapter.  This constructor implements the setting of the
  * 3 required properties for the object.
  * 
  * @param resource $d The datasource resource
  */
 function pgsqlAdapter($d)
 {
     parent::RecordSetAdapter($d);
     $fieldcount = fbsql_num_fields($d);
     $ob = "";
     $be = $this->isBigEndian;
     $fc = pack('N', $fieldcount);
     if (fbsql_num_rows($d) > 0) {
         fbsql_data_seek($d, 0);
         while ($line = fbsql_fetch_row($d)) {
             // write all of the array elements
             $ob .= "\n" . $fc;
             foreach ($line as $value) {
                 // write all of the array elements
                 if (is_string($value)) {
                     // type as string
                     $os = $this->_directCharsetHandler->transliterate($value);
                     //string flag, string length, and string
                     $len = strlen($os);
                     if ($len < 65536) {
                         $ob .= "" . pack('n', $len) . $os;
                     } else {
                         $ob .= "\f" . pack('N', $len) . $os;
                     }
                 } elseif (is_float($value) || is_int($value)) {
                     // type as double
                     $b = pack('d', $value);
                     // pack the bytes
                     if ($be) {
                         // if we are a big-endian processor
                         $r = strrev($b);
                     } else {
                         // add the bytes to the output
                         $r = $b;
                     }
                     $ob .= "" . $r;
                 } elseif (is_bool($value)) {
                     //type as bool
                     $ob .= "";
                     $ob .= pack('c', $value);
                 } elseif (is_null($value)) {
                     // null
                     $ob .= "";
                 }
             }
         }
     }
     $this->serializedData = $ob;
     $this->numRows = fbsql_num_rows($d);
     for ($i = 0; $i < $fieldcount; $i++) {
         $this->columnNames[$i] = $this->_charsetHandler->transliterate(fbsql_field_name($d, $i));
     }
 }
开发者ID:ksecor,项目名称:civicrm,代码行数:59,代码来源:fbsqlAdapter.php


示例2: fbsqlAdapter

 /**
  * Constructor method for the adapter.  This constructor implements the setting of the
  * 3 required properties for the object.
  * 
  * @param resource $d The datasource resource
  */
 function fbsqlAdapter($d)
 {
     parent::RecordSetAdapter($d);
     $fieldcount = fbsql_num_fields($d);
     for ($i = 0; $i < $fieldcount; $i++) {
         $this->columns[] = fbsql_field_name($d, $i);
     }
     if (fbsql_num_rows($d) > 0) {
         fbsql_data_seek($d, 0);
         while ($line = fbsql_fetch_row($d)) {
             $this->rows[] = $line;
         }
     }
 }
开发者ID:FalconGT,项目名称:DrEvony,代码行数:20,代码来源:fbsqlAdapter.php


示例3: _seek

 function _seek($row)
 {
     return @fbsql_data_seek($this->_queryID, $row);
 }
开发者ID:BackupTheBerlios,项目名称:facturaphp-svn,代码行数:4,代码来源:adodb-fbsql.inc.php


示例4: 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


示例5: 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


示例6: fetchInto

 /**
  * Fetch a row and return data in an array.
  *
  * @param resource $result result identifier
  * @param int $fetchmode ignored
  * @param int $rownum the row number to fetch
  * @return mixed data array or NULL on success, a MDB error on failure
  * @access public
  */
 function fetchInto($result, $fetchmode = MDB_FETCHMODE_DEFAULT, $rownum = NULL)
 {
     $result_value = intval($result);
     if ($rownum == NULL) {
         ++$this->highest_fetched_row[$result_value];
     } else {
         if (!@fbsql_data_seek($result, $rownum)) {
             return NULL;
         }
         $this->highest_fetched_row[$result_value] = max($this->highest_fetched_row[$result_value], $rownum);
     }
     if ($fetchmode == MDB_FETCHMODE_DEFAULT) {
         $fetchmode = $this->fetchmode;
     }
     if ($fetchmode & MDB_FETCHMODE_ASSOC) {
         $row = @fbsql_fetch_assoc($result);
         if (is_array($row) && $this->options['optimize'] == 'portability') {
             $row = array_change_key_case($row, CASE_LOWER);
         }
     } else {
         $row = @fbsql_fetch_row($result);
     }
     if (!$row) {
         if ($this->options['autofree']) {
             $this->freeResult($result);
         }
         return NULL;
     }
     if (isset($this->result_types[$result_value])) {
         $row = $this->convertResultRow($result, $row);
     }
     return $row;
 }
开发者ID:Esleelkartea,项目名称:kz-adeada-talleres-electricos-,代码行数:42,代码来源:fbsql.php


示例7: seek

 /**
  * Seek to a specific row in a result set
  *
  * @param int    $rownum    number of the row where the data can be found
  * @return mixed MDB2_OK on success, a MDB2 error on failure
  * @access public
  */
 function seek($rownum = 0)
 {
     if ($this->rownum != $rownum - 1 && !@fbsql_data_seek($this->result, $rownum)) {
         if (false === $this->result) {
             return $this->db->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null, 'resultset has already been freed', __FUNCTION__);
         }
         if (null === $this->result) {
             return MDB2_OK;
         }
         return $this->db->raiseError(MDB2_ERROR_INVALID, null, null, 'tried to seek to an invalid row number (' . $rownum . ')', __FUNCTION__);
     }
     $this->rownum = $rownum - 1;
     return MDB2_OK;
 }
开发者ID:Dulciane,项目名称:jaws,代码行数:21,代码来源:fbsql.php


示例8: seek

 /**
  * seek to a specific row in a result set
  *
  * @param int    $rownum    number of the row where the data can be found
  * @return mixed MDB2_OK on success, a MDB2 error on failure
  * @access public
  */
 function seek($rownum = 0)
 {
     if ($this->rownum != $rownum - 1 && !@fbsql_data_seek($this->result, $rownum)) {
         if ($this->result === false) {
             return $this->db->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null, 'seek: resultset has already been freed');
         } elseif (is_null($this->result)) {
             return MDB2_OK;
         }
         return $this->db->raiseError(MDB2_ERROR_INVALID, null, null, 'seek: tried to seek to an invalid row number (' . $rownum . ')');
     }
     $this->rownum = $rownum - 1;
     return MDB2_OK;
 }
开发者ID:ajisantoso,项目名称:kateglo,代码行数:20,代码来源:fbsql.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP fbsql_errno函数代码示例发布时间:2022-05-15
下一篇:
PHP fbsql_connect函数代码示例发布时间: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