You are here: Adding up query results « PHP « IT news, forums, messages
Adding up query results

Posted by Nathan Mealey on 01/16/05 06:17

I hope someone can help with this frustratingly simple (I assume!)
question I have.

I run this mysql query: "select sum(quantity)*price,price from sale
where dvd_id=1 group by price";

I get this result:
sum(quantity)*price price
450.00 15.00
29.99 29.99

I want to display the sum of the values in the first column
(450.00+29.99), but I cannot figure out how to do this! Can someone
clue me in?

Thanks a million,
Nathan
--
Nathan Mealey
Website Manager & Administrative Director
Cycle-Smart, Inc.
P.O. Box 1482
Northampton, MA
01061-1482
nathan@cycle-smart.com
(413) 210-7984
(512) 681-7043 Fax

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация