I have this INNER JOIN
structure 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
I just need to filter another field from the same table, how do I?
Example, I have the following line: ON categorias.codigo = empresas.categoria
I need it to also compare the categoria_2
How do I?
ON categorias.codigo = (empresas.categoria OR categorias.codigo = empresas.categoria_2)
It just did not work out.