0
I am trying to make a query that when I type the name of a product, return me the sector code and the image associated with that sector but my innerjoin is not working
I’m trying to do it like this:
select ID_CORREDOR_PC, IMAGEM_PC, produto.NOME_PRODUTO from procor
inner join produto on produto.ID_PRODUTOS = procor.ID_PROD_PC
inner join corredor on corredor.ID_CORREDOR = procor.ID_CORREDOR_PC
WHERE produto.NOME_PRODUTO like %'vinho'
Follows tables:
Table runners
Products table
Procor associative table (product X corridor)
I can only select by returning the runner ID according to the ID I say on the WHERE but am not able to say that my WHERE is actually the product name
It would be good to reduce the code to a [MCVE] can help a lot, and exchange this image stack for textual information. An example of how the result should be (with the respective input data) might help clarify which part is with the problem.
– Bacco