let me explain what I mean on the subject. I have a query to db like this :
"SELECT * from partners WHERE idioma='$lang' OR idioma='EN' ORDER BY id_partner ASC";
This query will return several results, some of them may be repeated because my database has the translations and we have a multilingual webpage in which you can navigate in different languages. Let's say I'm navigating in German, what I need is to show all results that are in English (because I don't always have the translations for all the "partners") but, when I have a result in the specific language, filter that one and only shows the translated result .
I understand that the best option should be to already filter it from database. I can't figure out because everything I've tried so far still shows the EN results. Can you please help ?
Thanks in advance .
question from:
https://stackoverflow.com/questions/65898858/filter-a-mysql-query-depending-on-a-column-value-but-returning-the-rest-of-resul 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…