I need only display some record if the id
field of the noticias
table is not referenced in the idnoticia
field of the fotos_noticias
table.
SELECT
noticias.id,
noticias.titulo,
noticias.slug,
fotos_noticias.foto
FROM noticias
INNER JOIN fotos_noticias
ON noticias.id <> fotos_noticias.idnoticia
WHERE
GROUP BY noticias.id
Unfortunately this SQL above displays all records without restriction