当前位置: 首页>>代码示例>>PHP>>正文


PHP fbsql_num_rows函数代码示例

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


在下文中一共展示了fbsql_num_rows函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: _initrs

 function _initrs()
 {
     global $ADODB_COUNTRECS;
     $this->_numOfRows = $ADODB_COUNTRECS ? @fbsql_num_rows($this->_queryID) : -1;
     $this->_numOfFields = @fbsql_num_fields($this->_queryID);
 }
开发者ID:BackupTheBerlios,项目名称:facturaphp-svn,代码行数:6,代码来源:adodb-fbsql.inc.php

示例4: numRows

 /**
  * Gets the number of rows in a result set
  *
  * This method is not meant to be called directly.  Use
  * DB_result::numRows() instead.  It can't be declared "protected"
  * because DB_result is a separate object.
  *
  * @param resource $result  PHP's query result resource
  *
  * @return int  the number of rows.  A DB_Error object on failure.
  *
  * @see DB_result::numRows()
  */
 function numRows($result)
 {
     $rows = @fbsql_num_rows($result);
     if ($rows === null) {
         return $this->fbsqlRaiseError();
     }
     return $rows;
 }
开发者ID:roojs,项目名称:pear,代码行数:21,代码来源:fbsql.php

示例5: _initrs

	function _initrs()
	{
	GLOBAL $ADODB_COUNTRECS;
		$this->_numOfRows = ($ADODB_COUNTRECS) ? @fbsql_num_rows($this->_queryID):-1;
		$this->_numOfFields = @fbsql_num_fields($this->_queryID);
	}
开发者ID:joeymetal,项目名称:v1,代码行数:6,代码来源:adodb-fbsql.inc.php

示例6: numRows

 /**
  * returns the number of rows in a result object
  *
  * @param ressource $result a valid result ressouce pointer
  * @return mixed MDB_Error or the number of rows
  * @access public
  */
 function numRows($result)
 {
     return @fbsql_num_rows($result);
 }
开发者ID:Esleelkartea,项目名称:kz-adeada-talleres-electricos-,代码行数:11,代码来源:fbsql.php

示例7: numRows

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

示例8: numRows

 /**
  * Returns the number of rows in a result object
  *
  * @return mixed MDB2 Error Object or the number of rows
  * @access public
  */
 function numRows()
 {
     $rows = @fbsql_num_rows($this->result);
     if (null === $rows) {
         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 0;
         }
         return $this->db->raiseError(null, null, null, 'Could not get row count', __FUNCTION__);
     }
     return $rows;
 }
开发者ID:Dulciane,项目名称:jaws,代码行数:20,代码来源:fbsql.php

示例9: numRows

 /**
  * returns the number of rows in a result object
  *
  * @return mixed MDB2 Error Object or the number of rows
  * @access public
  */
 function numRows()
 {
     $rows = @fbsql_num_rows($this->result);
     if (is_null($rows)) {
         if ($this->result === false) {
             return $this->db->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null, 'numRows: resultset has already been freed');
         } elseif (is_null($this->result)) {
             return 0;
         }
         return $this->db->raiseError();
     }
     return $rows;
 }
开发者ID:ajisantoso,项目名称:kateglo,代码行数:19,代码来源:fbsql.php


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