Mener du sådan her? SELECT SUM(cost) as total FROM sales where (passport = $myPassport AND paid <> 1)