A
Anonymous
Guest
Hi all,
How do I do something like adding up all the totals in an mysql table fields (i.e. number_of_sales)
So if 'user_table_cash' had a field called 'number_of_sales' and I done a query like
$query = "SELECT * FROM user_table_cash WHERE id='davetomas'";
and there was 10 results with the numbers 2,33,44,55,22,44,66,77,33,55
how would I add them all up to display the total amount?
Any help would be tops
How do I do something like adding up all the totals in an mysql table fields (i.e. number_of_sales)
So if 'user_table_cash' had a field called 'number_of_sales' and I done a query like
$query = "SELECT * FROM user_table_cash WHERE id='davetomas'";
and there was 10 results with the numbers 2,33,44,55,22,44,66,77,33,55
how would I add them all up to display the total amount?
Any help would be tops