Good afternoon, how can I make a query where I have in my field idProduto
several% com_dependent comma% and list each of their respective.
For example, in my ids
I have the idProduto
I want that in my query it returns me with ids 1,2,6
the data of the respective products that contains those inner join
how can I do that?
"SELECT p.id, p.idProduto, p.total, p.rastreio, p.envio, p.qtd, p.status, p.data, c.nome AS nomeCliente, c.email, c.telefone, c.cpf, c.cep, c.nResidencial, prod.nome FROM pedidos p INNER JOIN clientes c ON p.id_cliente = c.id INNER JOIN produtos prod ON prod.id = p.idProduto WHERE p.id = '$idPedido' "