var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: help with SUM()
I'm creating something small for reps to follow up on sales.
can somebody help me out with this
$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);
the problem is $com commision on sales.
Links removed - pootle flump
Last edited by pootle flump; 07-23-08 at 07:23.
Originally Posted by sujith.it
Well I'd need you to provide the whole code for a good idea of the problem.
If the problem is in the $com, it must be $amount or sum() that is the problem.
I would write it like this:
I just never use the sum personally, but it doesn't look like it's a problem.
effectivly, you're trying to divide the price by 4? or 25% of the actual price?
Maybe explain more and I might be able to help