Microsoft
Software
Hardware
Network
Question : Need a way to add a value to existing variable and display results
Hi,
I have a routine which calculates the sum of the total field in my database based on the user which is logged in using the $user_id variable. This all works however when I email the customer, the latest total value for the order they just purchased is not included as it hasn't been committed to database at this point, so the actual total spend since becoming a member isn't accurate.
What I need to do is something along the lines of:
$grandtotal = $spenttotal + $total
echo $grandtotal;
But I am unsure of the correct syntax for the above, or even if that will work. Can anybody assist please?
Thanks
Answer : Need a way to add a value to existing variable and display results
you are just missing 1 detail, the ;
1: 2: 3:
$grandtotal = $spenttotal + $total; echo $grandtotal;
Random Solutions
Outlook Web App Options
PHP Quiz
can't find Printer Setup Utility in Mac OS X 10.5.8
How to get grand totals from another query with subtotals without aggregate errors
Exchange 2007 Incremental backup
Include page headers when printing HTML pages with different headers on some of each page
sql server
VMware Workstation 7.1 Won't Install
instantiating an object in php
Why won't Exchange Transport service start in Exchange 2007 on our SBS 2008 server ?