Jump to content

Showing olap query results' in PHP


fooooof

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.