本文整理汇总了PHP中fbsql_affected_rows函数的典型用法代码示例。如果您正苦于以下问题:PHP fbsql_affected_rows函数的具体用法?PHP fbsql_affected_rows怎么用?PHP fbsql_affected_rows使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fbsql_affected_rows函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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->_last_query_manip) {
$result = @fbsql_affected_rows($this->connection);
} else {
$result = 0;
}
return $result;
}
示例2: _affectedrows
function _affectedrows()
{
return fbsql_affected_rows($this->_connectionID);
}
示例3: affectedRows
/**
* Gets the number of rows affected by the data manipulation
* query. For other queries, this function returns 0.
*
* @return number of rows affected by the last query
*/
function affectedRows()
{
if (DB::isManip($this->last_query)) {
$result = @fbsql_affected_rows($this->connection);
} else {
$result = 0;
}
return $result;
}
示例4: query
/**
* Send a query to the database and return any results
*
* @access public
*
* @param string $query the SQL query
* @param mixed $types array that contains the types of the columns in
* the result set
*
* @return mixed a result handle or MDB_OK on success, a MDB error on failure
*/
function query($query, $types = NULL)
{
$this->debug("Query: {$query}");
$ismanip = MDB::isManip($query);
$this->last_query = $query;
$first = $this->first_selected_row;
$limit = $this->selected_row_limit;
$this->first_selected_row = $this->selected_row_limit = 0;
$result = $this->connect();
if (MDB::isError($result)) {
return $result;
}
if ($limit > 0) {
if (!$ismanip) {
$query = str_replace('SELECT', "SELECT TOP({$first},{$limit})", $query);
}
}
if ($this->database_name != '') {
if (!@fbsql_select_db($this->database_name, $this->connection)) {
return $this->fbsqlRaiseError();
}
}
// Add ; to the end of the query. This is required by FrontBase
$query .= ';';
if ($result = @fbsql_query($query, $this->connection)) {
if ($ismanip) {
$this->affected_rows = @fbsql_affected_rows($this->connection);
return MDB_OK;
} else {
$result_value = intval($result);
$this->highest_fetched_row[$result_value] = -1;
if ($types != NULL) {
if (!is_array($types)) {
$types = array($types);
}
if (MDB::isError($err = $this->setResultTypes($result, $types))) {
$this->freeResult($result);
return $err;
}
}
return $result;
}
}
return $this->fbsqlRaiseError();
}
示例5: affectedRows
public function affectedRows()
{
if (!empty($this->connect)) {
return fbsql_affected_rows($this->connect);
} else {
return false;
}
}
示例6: _affectedRows
/**
* Returns the number of rows affected
*
* @param resource $result
* @param resource $connection
* @return mixed MDB2 Error Object or the number of rows affected
* @access private
*/
function _affectedRows($connection, $result = null)
{
if (null === $connection) {
$connection = $this->getConnection();
if (MDB2::isError($connection)) {
return $connection;
}
}
return @fbsql_affected_rows($connection);
}
示例7: _affectedRows
/**
* returns the number of rows affected
*
* @param resource $result
* @param resource $connection
* @return mixed MDB2 Error Object or the number of rows affected
* @access private
*/
function _affectedRows($connection, $result = null)
{
if (is_null($connection)) {
$connection = $this->getConnection();
if (PEAR::isError($connection)) {
return $connection;
}
}
return @fbsql_affected_rows($connection);
}