Jump to content

[SOLVED] Calculating subtotal price value from record in database


elpaisa

Recommended Posts

What do you mean, it is...

 

$query = mysql_query("SELECT SUM(`price`) FROM `table` WHERE `userID`='{$id}'");
$subtotal = mysql_result($query,0);

echo "Subtotal: $".$subtotal;

 

Okay... No drama's. Lol.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.