Hi guys!
I am affraid I need your help one more time.
I have a mysql statement that does not work.
$sql = "
SELECT SUM(sub_cost)
AS cost
FROM $table_name
WHERE NOT pay_type='cash'
";
To be more specific, what doesn't work is the last line. Without it it works fine.
What I need to do is, sum up one field in my database excluding those customers that payed in cash (pay_type='cash')
Am I writting it wrong?
If this isn't right can you please sugest a mysql statement that will work?
Thanx again guys in advance!