/** * Adds an increment statement * * @param mixed $key string field name or associative values array * @param mixed $amount amount to increment by * @return $this */ public function increment($key, $amount = 1) { $statement = new Increment($key); $statement->amount($amount); $this->values[$key] = $statement; return $this; }
/** * Database parameter shortcut. * * @param mixed $param param * @return object a new Fuel\Database\Expression\Increment object. */ public static function increment($field, $amount = 1) { $expression = new Expression\Increment($field); $expression->amount($amount); return $expression; }