InnerJoin with 3 tables Mysql [closed]

0

I am trying to make a query that when I type the name of a product, I return the sector code and the image associated with that sector but my innerjoin is not working

I'm trying to do 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'

Follow tables:

Table runners

Productstable

Procormembershiptable(productXrunner)

I can only do the select returning the hall ID according to the ID I say in WHERE but I can not say that my WHERE is actually the product name

    
asked by anonymous 04.12.2018 / 22:42

1 answer

1

Talk to Lucas, okay?

I think it's just a syntax error of your like.

Change this like %'vinho' so it like "%vinho" and speak the result to people.

Like syntax

I'm waiting for you.

    
04.12.2018 / 23:31