Jump to content

DISTINCT STATMENT HELP


fazzfarrell

Recommended Posts

I have put the following statment:

 

<code>

SELECT DISTINCTOrders.ID, Orders.OderNum, Orders.ProdCode, Orders.ProdeName, Orders.ProdePrice, Orders.Supplier, Orders.OrderDate, Orders.Payment, Orders.QTY, Orders.Sent, Orders.OrderTotal, Orders.`Size`, Orders.Colour, customer.Customer, customer.Orderid

FROM Orders, suppliers, customer

WHERE suppliers.Email = colname AND Orders.Supplier = suppliers.Supplier AND Orders.Payment = 'YES' AND Orders.OderNum = customer.Orderid

ORDER BY Orders.OrderDate DESC

<CODE>

 

The order no col can have eg 6 order numbers all the same- so I want to display the order no only once on the repeat region but as the other cols have other information it shows up everything! How do I change my statement to only show one copy of each order number?

Link to comment
https://forums.phpfreaks.com/topic/68219-distinct-statment-help/
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.