Copy link to clipboard
Copied
hi all, i need help from you all
i have a problem as like...
i create db_ewallet (debit,credit,userid)
#########################
# userid # debit # credit #
#-------------#------------#------------#
# John # $20 # $5 #
# John # $12 # #
# Ray # $22 # $12 #
# Lynda # $28 # $3 #
# # # #
#########################
i create table and make repeat region (user id is unique id)
the problem is i cant make a calculation total of debit because John (same people)
the command like this :to calculate debit
<%=(debit.Fields.Item("john").Value) + (debit.Fields.Item("Ray").Value)+ (debit.Fields.Item("lynda").Value)%>
the result appear = $70, the result should be like this : $82
Copy link to clipboard
Copied
Simple. In your loop that outputs the recordset, maintain two variables that accumulate the debt and credit values.
I'm confused with your code though. Do you actually have database columns named 'Ray' , etc?
If you need more help, then you need to supply more info; database design, ASP code, etc.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now