I have a anuncios
table, in which I want to list the anuncios
of the user together with the imagens
, I'm trying with the query
below, but if I have 5 imagens
registered in anuncio
, in the table it will display 5 times, can you limit the images?
Query :
"select a.*, u.nome as nome_usuario, i.thumb as nome_imagem from anuncios a
left join usuarios u on u.id = a.id_usuario left join imagens i on
i.id_anuncio = a.id where id_usuario = '{$idUsuario}'";