php mysql arrays and totals

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have been searching all over the internet and yet I have not found the
answer to my problem.
I have a mysql database which stores dollar amounts. The table is called
items, the field is
called amount. I use mysql_query("SELECT amount FROM items"); to get the
amounts into the script.
I would then like all the values to be added up for a grand total. I have
tried this and the
only thing I can come up with is a long string of numbers. instead of
getting lets say 100,
I would get:

10101010101010101010


any help would be greatly appreciated, thanks



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux