0
I have this structure INNER JOIN
that works perfectly for what I needed so far.
SELECT categorias.codigo,categorias.categoria,categorias.slug,empresas.cidade
FROM categorias
INNER JOIN
empresas
ON categorias.codigo = empresas.categoria
WHERE empresas.cidade = '100'
GROUP BY categorias.categoria
Only I need you to also find one more field of the same table, as I do?
Example, I have the following line: ON categorias.codigo = empresas.categoria
I need him to also compare the field categoria_2
How do I do?
ON categorias.codigo = (empresas.categoria OR categorias.codigo = empresas.categoria_2)
It just didn’t work out.