Jump to content

sql array unique?


dadamssg87

Recommended Posts

I have a table thats filled like the following. I want to get all the names for each row associated with a certain 'cal_id' but i don't want duplicate names. So this query i want would return "Some", "Random", "names", "of", "groups". Is there any easy way to do this with sql? or am i better off getting all the names in an array and then using array_unique()?

 

id    |      cal_id      |      name      |       

1    |          66              Some      |       

2    |          66      |      Some      |     

3    |          14      |      Random  |       

4    |          66      |      Random  |     

5    |          66      |      names      |       

6    |          66        |      names      |       

7    |          66        |      names      |       

8    |          66        |          of        |       

9    |          66        |      groups      |       

9    |          66        |      groups      |       

Link to comment
https://forums.phpfreaks.com/topic/237674-sql-array-unique/
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.