Skip to content
Advertisement

elect data from related tables with duplicate columns

I have 3 tables.

news

rubrics

parent_id is key for id parent in table rubrics.

And “news_rubriks”

How I can select news which apply to rubrics.id and rubrics.parent_id ?

Advertisement

Answer

If I understand correctly, you want to apply a filter to both the rubrik id and the parent. Say if you are searching for 1, then you want 1 in either column.

If so:

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement