Thasks,
Sorry to bother you again. I must be doing it wrong.
I am getting this error:
No data.
Warning: Supplied argument is not a valid MySQL result resource in c:\apache\htdocs\shoptest\total.php on line 32
line 32 = mysql_free_result($result);
It's not get the value I think. There are 5 records with the uidbelow.
Here is my code:
<?
mysql_connect('','','') or die ("Problem connecting to DataBase");
$query = "select sum(product_price) as total_product_price where uid=127.0.0.1999456484";
$result = mysql_db_query("shoptest", $query);
if ($result) {
while ($r = mysql_fetch_array($result)) {
$product_id = $r["product_id"];
$product_number = $r["product_number"];
$product_category = $r["product_category"];
$product_short = $r["product_short"];
$product_flypage = $r["product_flypage"];
$product_name = $r["product_name"];
$product_msrp = $r["product_msrp"];
$product_price = $r["product_price"];
$product_stock = $r["product_stock"];
$product_thumbimage = $r["product_thumbimage"];
$product_flyimage = $r["product_flyimage"];
echo "$total_product_price";
}
} else {
echo "No data.";
}
mysql_free_result($result);
?>