CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 basic math, need help please

Print topic Send  topic

Author Message
Rob


Posts: 13
Posted: 07/27/2009, 12:38 PM

Ok i have a shoppingcart in which i like to apply coupon a form coupon with 3 fields
member_id, sub_total and cpn
in the sql i have code
  
select member_id, sum(1.06*price) as sub_total from orders  
group by member_id  
1.06 because of state tax.
in before show i have
  
a = "50;25;15"  
b = "10;5;3"  
a = Split(a, ";")  
b = Split(b, ";")  
For i = 0 To UBound(a)  
If round(fldsub_total,0) >= a(i) Then  
fldcpn = b(i)  
fldcpn=FormatCurrency(fldcpn,2)  
Exit Sub  
else  
fldcpn = "0"  
End If  
Next  

output for cpn field i get 0 regardless what the sub_total is. can someone help please
_________________
I don't even know enough to know that i don't know.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.