I recently became treasurer of a club and decided to write a small program using localhost to keep track of the income and expenses. I am having problems changing the bank balance when I write or deposit a check.
It appears that with MYSQL data types for numbers are limited to Intgers and strings (Decimal is a string according to my book). Using varchar to hold my bank balance the following works.
The following works when writing a check
vBankBal = vBankBal - vCkAmt
Using the reverse to deposit a check concatenates the two strings:
vBankBal = vBankBal + vCkAmt
I know I am being stupid but what type field would I use or how would i add the two fields to give the new bank balance
Thanks in advance
It appears that with MYSQL data types for numbers are limited to Intgers and strings (Decimal is a string according to my book). Using varchar to hold my bank balance the following works.
The following works when writing a check
vBankBal = vBankBal - vCkAmt
Using the reverse to deposit a check concatenates the two strings:
vBankBal = vBankBal + vCkAmt
I know I am being stupid but what type field would I use or how would i add the two fields to give the new bank balance
Thanks in advance