I have a project in MySQL/PHP (YII) I have a code in mysql I want a code convert into sqlite .I have not much knowledge of sqlite any help should be appreciated .
SELECT sum(Orders.total) as total FROM Orders
where
IF(Orders.merge_split = "merge",Orders.merge_split_ids =:oid , Orders.id =:oid)
and Orders.admin_id=:admin
UNION
SELECT CAST(sum(Cashier_discount.discount) as DECIMAL(10,2)) as cashier_discount from Cashier_discount
where Cashier_discount.order_id=:oid and Cashier_discount.admin_id=:admin
Aucun commentaire:
Enregistrer un commentaire