php - How to select equal values one time from table -


this question has answer here:

i have table structure this:

|id | country | league | | 0 | germany | b1     | | 1 | germany | b2     | | 2 | italy   |      | 

how can germany once query? this:

germany, italy. 

you can this:

select distinct country some_table 

this give countries once.

if want country names in single result, can use group_concat():

select     group_concat(distinct country order country desc separator ',') country_list some_table 

Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -