fooooof Posted September 6, 2009 Share Posted September 6, 2009 Hi there I'm doing report web-system in(Oracle & PHP) using OLAP query's the problem is >>> How to present the result in friendly view??? Example: SELECT channel_desc, country_id, SUM(amount_sold) as SALES$ FROM sales, customers, times, channels WHERE sales.time_id = times.time_id AND sales.cust_id = customers.cust_id AND sales.channel_id = channels.channel_id AND channels.channel_desc IN ('Direct Sales', 'Internet') AND times.calendar_month_desc = '2000-09’ AND country_id IN ('UK', 'US') GROUP BY CUBE(channel_desc, country_id); this is database result: CHANNEL_DESC COUNTRY_ID SALES$ ------------------- ---------- --------------- Direct Sales UK 1,378,126 Direct Sales US 2,835,557 Direct Sales 4,213,683 Internet UK 911,739 Internet US 1,732,240 Internet 2,643,979 UK 2,289,865 US 4,567,797 6,857,662 and I want to show it in this form??? UK US total Direct Sales 1,378,126 2,835,557 4,213,683 Internet 911,739 1,732,240 2,643,979 2,289,865 4,567,797 6,857,662 Link to comment https://forums.phpfreaks.com/topic/173319-showing-olap-query-results-in-php/ Share on other sites More sharing options...
fooooof Posted September 7, 2009 Author Share Posted September 7, 2009 UP?????????? Link to comment https://forums.phpfreaks.com/topic/173319-showing-olap-query-results-in-php/#findComment-914066 Share on other sites More sharing options...
Mark Baker Posted September 7, 2009 Share Posted September 7, 2009 adodb has a special extension for handling pivot tables. You might want to take a look at that Link to comment https://forums.phpfreaks.com/topic/173319-showing-olap-query-results-in-php/#findComment-914067 Share on other sites More sharing options...
bundyxc Posted September 7, 2009 Share Posted September 7, 2009 Link to comment https://forums.phpfreaks.com/topic/173319-showing-olap-query-results-in-php/#findComment-914070 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.