Convert query into php

Sir I have these 2 tables (Arrival+Pouring)

While using following query, I get result shown in images

select c1.date,sum(nvl(cx.purchase-cx.sold,0)) as opening,c1.purchase,c1.sold,; sum(nvl(cx.purchase-cx.sold,0)) + c1.purchase-c1.sold as closing ; from ; (select NVL(a.date,b.date) as date,CAST(NVL(a.qty,0) as integer) as purchase,; CAST(NVL(b.qty,0) as integer) as sold from purchase a FULL JOIN sold b ON a.date = b.date order by 1) c1 ; left join; (select NVL(a.date,b.date) as date,CAST(NVL(a.qty,0) as integer) as purchase,; CAST(NVL(b.qty,0) as integer) as sold from purchase a FULL JOIN sold b ON a.date = b.date order by 1) cx ; on c1.date>cx.date; group by c1.date,c1.purchase,c1.sold

The query work fine to get opening and closing balance.
But I want to use PHP Codes like array and echo etc to show result.

Please help me to convert the query into php codes.

Thanks

Make the attempt to do so on your own…

Fellow Experts, don’t waste your time here.

This has been asked and answered on another forum.

Sponsor our Newsletter | Privacy Policy | Terms of Service