Adding Values from mySQL
Posted: Wed Aug 18, 2004 12:19 pm
Hello...
I have a large database called 'tracking'... I have thousands of rows with fields in them that include fields called 'need' and 'delivered'...
'need' and 'delivered' are tinyInt that have 1-2 digit numbers in them...
What I want to do is query the database and get the TOTAL number of the difference between 'need' and 'delivered'...
Let's say example of two rows:
need = '20'
delivered = '5'
(the difference would be '15')
need = '18'
delivered = '4'
(the difference would be '14')
So the query would spit out => '29' (the differences added together)
Thank you for any help you can give me...
...
I have a large database called 'tracking'... I have thousands of rows with fields in them that include fields called 'need' and 'delivered'...
'need' and 'delivered' are tinyInt that have 1-2 digit numbers in them...
What I want to do is query the database and get the TOTAL number of the difference between 'need' and 'delivered'...
Let's say example of two rows:
need = '20'
delivered = '5'
(the difference would be '15')
need = '18'
delivered = '4'
(the difference would be '14')
So the query would spit out => '29' (the differences added together)
Thank you for any help you can give me...
...