Total Colom Value...
I Need Some Help. I'm Trying To ADD All Of The Values Inside A Single Colom In A Data Base. I Have Come UP With The Following:
$query = mysql_query("SELECT SUM(price) FROM products") or die(mysql_error());
$result = mysql_result($query, 0);
echo "Total Product Value: ",'$price';
There Are No Errors It Displays: Total Product Value: $price
So I'm Guessing I Didn't Set $price Correctly...
Would Someone Fix This and Submit The Complete Code Instead Of Just Directions To Fix It?
__________________
---------------------------
TRY THIS NEW WEBHOST:
http://199hosting.net
$1.99 Hosting! Real! Fast!
Plenty Of Space & Transfer!
|