Hi,
I have the following MySQL tables:
categories:
- id
- parent
categorie_name:
- cat_id (link to categories.id)
- name
- language
What I would like to do is select all categories with a certain parent and a certain language(NED, FRA or GER, etc...) BUT if the language is not available use the default ENG language.
This is what i used sofar but did not work.
SELECT * FROM categories a, categorie_name b WHERE a.parent = $pid AND a.id > 0 AND a.id=b.cat_id AND b.language IN('ENG','$view_taal') GROUP BY b.cat_id ORDER BY b.name
How can i have the categorie name who has the $view_taal as language, but if not available give me the ENG name (because that language is a required field)
Kind regards,
Gerry