forked from SkyPHP/skyphp
-
Notifications
You must be signed in to change notification settings - Fork 1
aql::increment
stanistan edited this page May 10, 2011
·
1 revision
The function would updates a value in a database in relation to itself.
- (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
$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.