本文整理汇总了PHP中msql_affected_rows函数的典型用法代码示例。如果您正苦于以下问题:PHP msql_affected_rows函数的具体用法?PHP msql_affected_rows怎么用?PHP msql_affected_rows使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了msql_affected_rows函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: affectedRows
/**
* Determines the number of rows affected by a data maniuplation query
*
* 0 is returned for queries that don't manipulate data.
*
* @return int the number of rows. A DB_Error object on failure.
*/
function affectedRows()
{
if (!$this->_result) {
return 0;
}
return msql_affected_rows($this->_result);
}
示例2: Query
function Query($query)
{
$this->Debug("Query: {$query}");
$first = $this->first_selected_row;
$limit = $this->selected_row_limit;
$this->first_selected_row = $this->selected_row_limit = 0;
if (!$this->SelectDatabase()) {
return 0;
}
if ($result = msql_query($query, $this->connection)) {
if (substr(strtolower(ltrim($query)), 0, strlen("select")) == "select") {
if ($limit > 0) {
$this->limits[$result] = array($first, $limit);
}
$this->highest_fetched_row[$result] = -1;
}
$this->affected_rows = msql_affected_rows($result);
} else {
return $this->SetError("Query", msql_error());
}
return $result;
}
示例3: affectedRows
/**
* Gets the number of rows affected by a query.
*
* @return number of rows affected by the last query
*/
function affectedRows()
{
return @msql_affected_rows($this->connection);
}
示例4: IsInArchive
function IsInArchive($dbi, $pagename)
{
$pagename = addslashes($pagename);
$query = "select pagename from archive where pagename='{$pagename}'";
// echo "Query: $query<br>\n";
if ($res = msql_query($query, $dbi['dbc'])) {
return msql_affected_rows($res);
}
}