XF 2.1 Increase field +1

Robert9

Well-known member
in mysql i do

update table set field = field + 1;

it is not needed to fetch the value before saving it.


Now i try to do that like:

$userfield->field_value = ?;
$userfield->save();


but how can i tell to add +1?
I tried different things, but fail and i have no idea where to search.
Is it needed to fetch the value first?
 
Back
Top Bottom