Function DatabaseConnector->query_update

Definitions

sources/database.php

  • Update (edit) a row in the database.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Return: int

Parameters

Name Type Default Set Range Description
$table string required parameter N/A N/A The table name
$update_map array required parameter N/A N/A The UPDATE map
$where_map array [] N/A N/A The WHERE map [will all be ANDed together]
$end string Blank (empty string) N/A N/A Something to tack onto the end of the statement
$max ?integer Null N/A N/A The maximum number of rows to update (null: no limit)
$start integer 0 N/A N/A The starting row to update
$num_touched boolean False N/A N/A Whether to get the number of touched rows. WARNING: Do not use in core code as it does not work on all database drivers
$fail_ok boolean False N/A N/A Whether to allow failure (outputting a message instead of exiting completely)

Return

  • The number of touched records (null: hasn't been asked / error / not supported)
  • Type: ?integer
  • Set: N/A
  • Range: N/A