this is my query for getting order total for particular date. Here I can't get proper result when using AND (tos.status!='5' or tos.status!='6'). what is the problem in this?
SELECT sum(tot.total) as total
FROM orders_totals tot, orders tos
WHERE DATE(tos.`timestamp`) BETWEEN '2013-12-09' AND '2013-12-09' and
tot.`order` = tos.id and tot.description='Grand-Total' AND
(tos.status!='5' or tos.status!='6')
Try this: