[Dbix-class] Increment MySQL field

Ben Vinnerd ben-dbixclass at vinnerd.com
Fri May 15 13:27:39 GMT 2009


Hey,

I have the following SQL to increment a field by 100:

update account set balance = balance + 100

I can increment a field with DBIC, like so:

$account->update({balance => \'balance + 100'});

Is there a better/cleaner way of doing this in DBIC?

Cheers,

Ben




More information about the DBIx-Class mailing list