I have 2 tables – one with articles, and one with article related photos. Each article can have none, one or multiple photos related to it (article_id as foreign key)
Query I use to fetch data is:
SELECT articles.article_id, articles.article_text article_photos.photo_filename
FROM articles, article_photos
WHERE article_photos.article_id = articles.article_id
And it returns to me all data + 1 photo_filename.
Question is, when 2 or more photos are related to article, how do I read them?
Thanks!
It will replicate the same row from
articles, but different row fromarticle_photossuch as