Hi,
This is my table:
TABLE PROVINCIAS
ID NAME PRIO LANGUAGE
1 Malaga 1 SPA
2 Gerona 1 SPA
2 Geronna 2 SPA
2 Girona 1 CAT
I want to select the whole list (the list of IDs) with a given language.
For example, giveProvincias("SPA") will return "1 Malaga" and "2 Gerona" (always PRIO=1).
But I want giveProvincias("CAT") return all the items in CAT language, and for the items with no CAT alternative, the SPA one instead.
For example: giveProvincias("CAT") will return "1 Malaga" and "2 Girona" (PRIO=1 in spa and cat languages).
I would try a subselect, but mysql doesn't support it yet.
Thanks a lot.