3
Good night,
I’m making a inner join
3 tables but I’m not getting it to work must have some mistake that I’m not able to detect or do the right way I’m new to this inner join
PHP
SELECT *, (SELECT * FROM categorias_estabelecimentos WHERE categoria_slug = :categoria_slug) FROM estabelecimentos
INNER JOIN estabelecimentos_anexos ON estabelecimentos_anexos.id_mae = estabelecimentos.id
WHERE estabelecimentos.id = categorias_estabelecimentos.estabelecimento_id
AND estabelecimentos.activo = :activo
AND estabelecimentos_anexos.seccao = :seccao
ORDER BY pos ASC
Select *. (dot not comma), see if you can solve.
– RFL
Does not resolve with the dot when testing directly in phpmyadmin of the error of
SQL syntax
with the comma ofOperand should contain 1 column(s)
– César Sousa