Gossamer Forum
Home : Products : DBMan : Discussions :

Quick question

Quote Reply
Quick question
Can DBMan add and subtract using form input?

Example if you have 2 apples in your database and a visitor submits a form with 2 in the quanitity feild. will the database show 4 (2+2) or will it show just the 2 that was submitted?

Quote Reply
Re: Quick question In reply to
Yes...Perl can handle mathematical computations very well. Here is a quick example:


$in{'FieldName3'} = $in{'FieldName1'} + $in{'FieldName2'};

There are some lengthy threads regarding shopping cart mods that illustrate more complex examples of mathematical computations in the DBMAN Customization Forum.

Hope this helps.