2
what’s wrong with this consultation?
SELECT
clientes.idClientes,
clientes.nome,
clientes.bloqueado,
planosclientes.idPlanos,
planos.nome,
enderecos.bairro,
enderecos.cidade
FROM
planosclientes INNER JOIN clientes ON planosclientes.idClientes = clientes.idClientes AND
planosclientes INNER JOIN planos ON planosclientes.idPlanos = planos.idPlanos AND
planosclientes INNER JOIN enderecos ON planosclientes.idPlanosClientes = enderecos.idPlanosClientes
WHERE
clientes.bloqueado = 's' AND
enderecos.tipoEndereco = 'i'
You’re making the following mistake:
Unknow colunm 'planosclientes' in on clause.
But there is no column 'planosclientes' in the clauses on. What you have are tables 'planosclientes'.
What mistake is this?
Your consultation seems wrong, there is a
AND
It was at the end compared to nothing. Identa better the code.– rray