Skip to content
stanistan edited this page May 10, 2011 · 1 revision

The function would updates a value in a database in relation to itself.

Parameters

  • (string) in the format of table_name.field_name (like aql::value)
  • (string) or (int) number to increment by, positive or negative
  • (string) or (int) ID or IDE for the record.
  • (bool) if true will suppress errors, otherwise it triggers E_USER_ERROR on failure

Usage

$rs = aql::increment('page.num_views', 1, $page_id, true); // returns true or false

aql::increment('page.num_views', 1, $page_id); // if the query fails, an error will be emitted.
Clone this wiki locally