Hi
It's been a long time since I used SQL now and I am stuck
I have a query where I use a JOIN
SELECT articles.title, media.mediafilethumb FROM articles LEFT JOIN media ON articles.mediafileid = media.mid WHERE articles.published = 1 AND articles.pubdate < NOW() AND articles.expdate > NOW() AND articles.pageid = 5 ORDER BY articles.pubdate DESC LIMIT 6;
This gives me this
Title, filename
- Title1, somefile.jpg
- Title2, somefile.jpg
- Title3, NULL
The item has no mediafile id so it gives me NULL
My problem is that my web-page do not print out the filename in any of the 6 rows
Can anyone please help me with this
I've done this before, and can not remember the proper syntax
best regards,
Thoamas A.