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
Sharepoint Calculated Column Question:How to convert date to (YY) Month format from mm/dd/yy?
Access to toher User's Inboxes
Outlook 2010 fails to login via POP3 to SBS2008 server
Outlook/Exchange Issue with Emails not showing
How to make simple PHP IF function for the following simple scenario ?
Javascript to Silverlight (VB)
Remote access VPN via Thompson TG585 v7
How do i apply formatting to all hyperlinks in Word 2007?
Export Data to XML File from SQL Database
workflow/bpm engine in python