1
Help with SQL:
Query
:
SELECT * FROM concursos
LEFT JOIN concursos_categorias ON concursos.id = concursos_categorias.idConcurso
LEFT JOIN categorias_concursos ON concursos_categorias.idCategoria = categorias_concursos.id
WHERE concursos.id = 15
concursos
is my table where I have all my contestscategorias_concursos
is the table where all categoriesconcursos_categorias
is my table where the contest categories
on the table concursos_categorias
has the columns idConcurso
and idCategoria
The query she’s bringing me the contest categories, but I also needed to bring the other categories, not repeating the ones I have from this contest.
If you discovered the solution, post it as a response and mark it as an accepted response. In addition valid is encouraged.
– emanuelsn