Help - Search - Members - Calendar
Full Version: help with SUM()
Weborum Webmaster Forum > Web Page Design > PHP
susa
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.

___________________________________________
graduation gifts Audi A4 Performance Muffler
Joe
If you are using the SUM function the best advice I can give you would be to check the manual for how SUM is used: -

http://uk3.php.net/array-sum
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.