i try to select all rows "labels" from a table by parent_id and language. Default language is en.
list = SELECT * FROM labels WHERE parent_id = x AND lang='de'
if( list.isEmpty() ){
list = SELECT * FROM labels WHERE parent_id = x AND lang='en'
}
how to handle this using only one MySQL Statement?
many Thanks
Give this a try,
The FIELD() function returns the index of string in the list.
Here's using
JOIN