fazzfarrell Posted September 6, 2007 Share Posted September 6, 2007 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 More sharing options...
Yesideez Posted September 6, 2007 Share Posted September 6, 2007 There's no space after the DISTINCT keyword. btw, You need square [ ] brackets when using the CODE tag on here. Link to comment https://forums.phpfreaks.com/topic/68219-distinct-statment-help/#findComment-342956 Share on other sites More sharing options...
fazzfarrell Posted September 6, 2007 Author Share Posted September 6, 2007 Thanks I realised I had no space just after I posted, but even then i can't get it to work Link to comment https://forums.phpfreaks.com/topic/68219-distinct-statment-help/#findComment-342963 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.