本文整理汇总了PHP中msql_num_rows函数的典型用法代码示例。如果您正苦于以下问题:PHP msql_num_rows函数的具体用法?PHP msql_num_rows怎么用?PHP msql_num_rows使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了msql_num_rows函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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 = @msql_num_rows($result);
if ($rows === false) {
return $this->msqlRaiseError();
}
return $rows;
}
示例2: 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;
}
}
示例3: NumberOfRows
function NumberOfRows($result)
{
$rows = msql_num_rows($result);
if (isset($this->limits[$result])) {
if (($rows -= $this->limits[$result][0]) < 0) {
$rows = 0;
} else {
if ($rows > $this->limits[$result][1]) {
$rows = $this->limits[$result][1];
}
}
}
return $rows;
}
示例4: numRows
function numRows($result)
{
$rows = @msql_num_rows($result);
if (!$rows) {
return $this->raiseError();
}
return $rows;
}
示例5: GetAllWikiPageNames
function GetAllWikiPageNames($dbi_)
{
$res = msql_query("select pagename from wiki", $dbi['dbc']);
$rows = msql_num_rows($res);
for ($i = 0; $i < $rows; $i++) {
$pages[$i] = msql_result($res, $i, 'pagename');
}
return $pages;
}