本文整理汇总了PHP中sybase_num_rows函数的典型用法代码示例。如果您正苦于以下问题:PHP sybase_num_rows函数的具体用法?PHP sybase_num_rows怎么用?PHP sybase_num_rows使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sybase_num_rows函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: select
function select($fields, $tables, $where = "", $order_by = "", $group_by = "", $having = "")
{
$sql_stat = " select {$fields} from {$tables} ";
if (!empty($where)) {
$sql_stat .= "where {$where} ";
}
if (!empty($group_by)) {
$sql_stat .= "group by {$group_by} ";
}
if (!empty($order_by)) {
$sql_stat .= "order by {$order_by} ";
}
if (!empty($having)) {
$sql_stat .= "having {$having} ";
}
$this->db_result = @sybase_query($sql_stat) or print "Error";
$this->db_affected_rows = @sybase_num_rows($this->db_result);
return $sql_stat;
}
开发者ID:rezarahimi4861,项目名称:icmf,代码行数:19,代码来源:sybase.php
示例2: num_rows
/**
* Number of rows in the result set
*
* @access public
* @return integer
*/
function num_rows()
{
return @sybase_num_rows($this->result_id);
}
开发者ID:alexandrebagio,项目名称:CodeIgniter3-sybase-driver,代码行数:10,代码来源:sybase_result.php
示例3: 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 = @sybase_num_rows($result);
if ($rows === false) {
return $this->sybaseRaiseError();
}
return $rows;
}
开发者ID:Cyberspace-Networks,项目名称:PeopleAggregator,代码行数:21,代码来源:sybase.php
示例4: _initrs
function _initrs()
{
global $ADODB_COUNTRECS;
$this->_numOfRows = $ADODB_COUNTRECS ? @sybase_num_rows($this->_queryID) : -1;
$this->_numOfFields = @sybase_num_fields($this->_queryID);
}
开发者ID:ceryxSeidor,项目名称:ProyectoPruebaWSV2,代码行数:6,代码来源:adodb-sybase.inc.php
示例5: lastNumRows
/**
* Returns number of rows in previous resultset. If no previous resultset exists,
* this returns false.
*
* @return integer Number of rows in resultset
*/
function lastNumRows()
{
if ($this->hasResult()) {
return @sybase_num_rows($this->_result);
}
return null;
}
开发者ID:christianallred,项目名称:fluent_univ,代码行数:13,代码来源:dbo_sybase.php
示例6: sql_num_rows
function sql_num_rows($res)
{
global $dbtype;
switch ($dbtype) {
case "MySQL":
$rows = mysql_num_rows($res);
return $rows;
break;
case "mSQL":
$rows = msql_num_rows($res);
return $rows;
break;
case "postgres":
case "postgres_local":
$rows = pg_numrows($res->get_result());
return $rows;
break;
case "ODBC":
case "ODBC_Adabas":
$rows = odbc_num_rows($res);
return $rows;
break;
case "Interbase":
echo "<BR>Error! PHP dosen't support ibase_numrows!<BR>";
return $rows;
break;
case "Sybase":
$rows = sybase_num_rows($res);
return $rows;
break;
default:
break;
}
}
开发者ID:BackupTheBerlios,项目名称:domsmod-svn,代码行数:34,代码来源:sql_layer.php
示例7: _num_rows
protected function _num_rows($result_id)
{
global $configArray;
if (strcasecmp($configArray['System']['operatingSystem'], 'windows') == 0) {
return sybase_num_rows($result_id);
} else {
return mssql_num_rows($result_id);
}
}
开发者ID:victorfcm,项目名称:VuFind-Plus,代码行数:9,代码来源:Horizon.php
示例8: num_rows
/**
* Return the number of rows of the current result
* @return integer
*/
protected function num_rows()
{
return @sybase_num_rows($this->resResult);
}
开发者ID:jens-wetzel,项目名称:use2,代码行数:8,代码来源:DB_Sybase.php
示例9: num_rows
function num_rows()
{
return sybase_num_rows($this->Query_ID);
}
开发者ID:antirek,项目名称:prestige-pbx,代码行数:4,代码来源:phplib_sybase.php
示例10: onQueryEnd
/**
* Process end of query event.
*
* @param var observable
* @param var dbevent
*/
public function onQueryEnd($obs, $arg)
{
$this->cat->info($this->getClassName() . '::onQueryEnd() Query was:', sizeof($this->queries) == 1 ? $this->queries[0] : $this->queries);
$result = $arg->getArgument();
$sc = 0;
$reads = 0;
foreach (array_keys($this->messages) as $idx) {
$msg = $this->messages[$idx];
switch ($msg['msgnumber']) {
case 3615:
$split = sscanf($msg['text'], 'Table: %s scan count %d, logical reads: (regular=%d apf=%d total=%d), physical reads: (regular=%d apf=%d total=%d), apf IOs used=%d');
$this->cat->infof('IO(%s): scan count= %d, logical= %d, physical= %d', $split[0], $split[1], $split[4], $split[7]);
// Add overall statistics
$sc += $split[1];
$reads += $split[4] + $split[7];
break;
case 3614:
$split = sscanf($msg['text'], 'Total writes for this command: %d');
if ($split[0] > 0) {
$this->cat->infof('Write-IO: %d', $split[0]);
}
break;
}
}
$this->cat->infof('Overall stats for query: scan count= %d, reads= %d', $sc, $reads);
// Retrieve number of rows returned, then calculate average cost of row
if (1 < ($nrows = sybase_num_rows($result->handle))) {
$this->cat->infof('Average stats for query: scan count= %0.02f, reads= %0.02f (%d lines)', $sc / $nrows, $reads / $nrows, $nrows);
}
$this->queries = $this->messages = array();
}
开发者ID:melogamepay,项目名称:xp-framework,代码行数:37,代码来源:SybaseIOObserver.class.php
示例11: numRows
/**
* Number of rows in a result
*
* @param mixed $result
* @return integer
*/
function numRows($result)
{
return sybase_num_rows($result);
}
开发者ID:jr-ewing,项目名称:phpMyFAQ,代码行数:10,代码来源:Sybase.php
示例12: ExecuteScalar
function ExecuteScalar($sql)
{
$retVal = null;
if (!$this->conn) {
$this->Connect();
}
$res = sybase_query($sql, $this->conn);
if ($res) {
if (sybase_num_rows($res) > 0) {
$retVal = sybase_result($res, 0, 0);
}
sybase_free_result($res);
}
return $retVal;
}
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:15,代码来源:class.DCL_DB_sybase.inc.php
示例13: lastNumRows
/**
* Returns number of rows in previous resultset. If no previous resultset exists,
* this returns false.
*
* @return integer Number of rows in resultset
*/
function lastNumRows()
{
if ($this->_result and is_resource($this->_result)) {
return @sybase_num_rows($this->_result);
}
return null;
}
开发者ID:kaz0636,项目名称:openflp,代码行数:13,代码来源:dbo_sybase.php
示例14: numRows
public function numRows()
{
if (!empty($this->query)) {
return sybase_num_rows($this->query);
} else {
return 0;
}
}
开发者ID:Allopa,项目名称:ZN-Framework-Starter,代码行数:8,代码来源:SybaseDriver.php
注:本文中的sybase_num_rows函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论