Jump to content

distinct help


Mr Chris

Recommended Posts

Hi,

 

Have a very silly question.

 

If I want to query a distinct name out of mysql database i'd use:

 

Select DISTINCT name from names

 

However, if I wanted the id of that distinct name also outputted BEFORE the name I thought i'd use

 

Select DISTINCT id, name from names

 

But that does no longer return distinct only records.  Can anyone help?

 

Thanks

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