I guess this is what you mean:

 sum(quantity)*price    price
        450.00          15.00
        479.99          29.99
        ...             ...

is that right?

JeRRy wrote:
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?


// Multiplying with varaibles
$factorA = number_format(system_value('sum');
$factorB = number_format(system_value('price'), 0);
$product = $factorA + $factorB;
echo $product;

Something like that?

You'll have to obviously play with this to make it
work for you.  But calculations work like your Windows
Calculator number keypad.

+ = plus
- = minus
* = multiply

Look at these:


Find local movie times and trailers on Yahoo! Movies.

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

Reply via email to