function add($type, $id, $field, $amount = 1)
	{
		$this->init($type, $id);
		if(!isset($this->data[$type][$id]['add'][$field]))
		{
			$this->data[$type][$id]['add'][$field] = 0;
		}
		$this->data[$type][$id]['add'][$field] += $amount;
	}
function add($type, $id, $field, $amount = 1)
	{
		$this->init($type, $id);
		if(!isset($this->data[$type][$id]['add'][$field]))
		{
			$this->data[$type][$id]['add'][$field] = 0;
		}
		$this->data[$type][$id]['add'][$field] += $amount;
	}
function add ( $ type , $ id , $ field , $ amount = 1 ) { $ this -> init ( $ type , $ id ) ; if ( ! isset ( $ this -> data [ $ type ] [ $ id ] [ 'add' ] [ $ field ] ) ) { $ this -> data [ $ type ] [ $ id ] [ 'add' ] [ $ field ] = 0 ; } $ this -> data [ $ type ] [ $ id ] [ 'add' ] [ $ field ] += $ amount ; }
increments or decrements a field.
@param $type which table (topic, user, forum or post)
@param $id topic_id, user_id etc.
@param $field field name (e.g. topic_replies)
@param $amount how much to add/subtract (default 1)
example: $sync->add('topic', 123, 'topic_replies', 1)
-> UPDATE phpbb_topics SET topic_replies = topic_replies + 1 WHERE topic_id = 123
increments or decrements a field .