db_affected_rows

includes/database.pgsql.inc, line 237

Versions
4.6 – 6
db_affected_rows()

Determine the number of rows changed by the preceding query.

Related topics

▾ 12 functions call db_affected_rows()

cache_set in includes/cache.inc
Store data in the persistent cache.
filter_list_format in modules/filter/filter.module
Retrieve a list of filters for a certain format.
node_type_update_nodes in modules/node/node.module
Updates all nodes of one type to be of another type.
openid_user_delete_form_submit in modules/openid/openid.pages.inc
search_index in modules/search/search.module
Update the full-text search index for a particular item.
search_update_totals in modules/search/search.module
This function is called on shutdown to ensure that search_total is always up to date (even if cron times out or otherwise fails).
sess_write in includes/session.inc
statistics_exit in modules/statistics/statistics.module
Implementation of hook_exit().
system_update_6038 in modules/system/system.install
Ensure that "Account" is not used as a Profile category.
user_set_authmaps in modules/user/user.module
Save mappings of which external authentication module(s) authenticated a user. Maps external usernames to user ids in the users table.
variable_set in includes/bootstrap.inc
Set a persistent variable.
_update_cache_set in modules/update/update.module
Store data in the private update status cache table.

Code

<?php
function db_affected_rows() {
  global $last_result;
  return empty($last_result) ? 0 : pg_affected_rows($last_result);
}
?>
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.