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
Flex Shared Object - Array Collection access
Formula to split Names
Cannot Replicate FREEBUSY from Exchange 2003 to Exchange 2010 - EVENT 14029, 4003,
NFS share on FreeNAS
100% CPU usage in vCenter but not in taskmanager on the Windows NT 4.0 VM that has been converted
Linux under virtual box
Black screen of death upon turning PC On
Robocopy, security perms and local groups
Passing a structure from VBA in Excel to a C DLL
2 levels treeMap