ananeto23 Posted December 10, 2016 at 10:57 AM Report Share #601139 Posted December 10, 2016 at 10:57 AM olá olá, sou completamente verde nestas andanças, perdao se este topico é descontextualizado e vou ter respostas do género 'procura'. Ora, eu estou a criar uma loja. Eu tenho a tabela de productos populada, e a das imagens igualmente. Tenho uma tabela product_images que não estou a perceber qual e a melhor maneira de ir as duas tabelas anteriores buscar os valores. Ajudinha? Agradeço Link to comment Share on other sites More sharing options...
N3lson Posted December 12, 2016 at 08:35 AM Report Share #601191 Posted December 12, 2016 at 08:35 AM (edited) Bom dia (?????) Não percebo bem a pergunta, mas pelo que entendi tens de usar o JOIN nas querys Edited December 12, 2016 at 08:36 AM by N3lson You can't do it, kid. But don't worry, my boy. You're not the only one. No one else can do it. Link to comment Share on other sites More sharing options...
ananeto23 Posted December 12, 2016 at 09:52 AM Author Report Share #601192 Posted December 12, 2016 at 09:52 AM 1 hour ago, N3lson said: Bom dia (?????) Não percebo bem a pergunta, mas pelo que entendi tens de usar o JOIN nas querys Bom dia, sim, mas não percebi como o fazer. A table product_images apenas tem product_id_FK, image_id_FK e product_image_id. Tendo inserido os productos na tabela, e as imagens na tabela imagens, estou um bocado perdida. Obrigada Link to comment Share on other sites More sharing options...
ruicosta.web Posted December 16, 2016 at 04:02 PM Report Share #601299 Posted December 16, 2016 at 04:02 PM se queres obter as imagens de um determinado produto: select * from images inner join product_images on images.id = product_images.image_id where product_images.product_id = 333 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now