PDA

View Full Version : help with SUM()



susapra
09-20-2008, 01:46 PM
I'm creating something small for reps to follow up on sales.

can somebody help me out with this

Quote:
$com = SUM($amount*0.25);

$qry = "INSERT INTO data (date, rep, client, amount, com, status) VALUES ('$postdate', '$rep', '$client', '$amount', '$com', 'pending')";
$result = mysql_query($qry);
if($result) {
header("location: success.php");
exit();
}else {
die("Query failed");
}
the problem is $com commision on sales.

___________________________________
baby gift (www.wisheo.com) Audi A4 Muffler (http://www.drivewire.com/vehicle/audi-a4/muffler/)