ok. so i have this table:
|item| quantity| price|
|apple | 2 | 2.00 |
|orange | 3 | 1.50 |
|grape | 5 | 2.50 |
i want to display the Grand Total that a customer has to pay.
how to do that? enter code here
i don't really know how to use array. can anyone show me how?
my code (sort of)
the price is shown in each of the row using this query:
<cfquery name="getPrice" datasource="fruits">
select *
from fruits
</cfquery>
<cfloop query="getPrice">
#quantity# | #price# | #totalPrice#
</cfloop><br>
the Grand Total should be displayed in the last row (Grand Total =$ 21.00 ).
Thanks for your help.