[PHP-DB] sorting tables

2002-05-03 Thread nauti

Hi everybody

I am doing a select in my oracle DB where i get some records. These records
are grouped by product id, cost, etc, and amount sold every month.

Then, i show all regs in a table, but as the ORDER BY is done also with the
month / year, because i want to show how much every month is sold, it
creates a new line even also the product is the same. Then i have my table
with x times the same product, in every month column zero values except the
amount for that month.

Is there a way to show one product per row with every amount on every month
column?

Thx in advance



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] sorting tables

2002-05-03 Thread Jason Wong

On Friday 03 May 2002 16:02, nauti wrote:
 Hi everybody

 I am doing a select in my oracle DB where i get some records. These records
 are grouped by product id, cost, etc, and amount sold every month.

 Then, i show all regs in a table, but as the ORDER BY is done also with the
 month / year, because i want to show how much every month is sold, it
 creates a new line even also the product is the same. Then i have my table
 with x times the same product, in every month column zero values except the
 amount for that month.

 Is there a way to show one product per row with every amount on every month
 column?

Try incorporating a DISTINCT somewhere in your SELECT.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php