PHP-Code:
SELECT
_news.ID,
_news.title,
_news.news,
_news.date,
_news.cat as cat_ID,
_news_cat.name as cat,
_news_cat.picture,
_member.UserName,
COUNT(_news_comments.newsID) as comments
FROM
_news
LEFT JOIN
_member
ON
_member.UserId = _news.user
LEFT JOIN
_news_cat
ON
_news_cat.ID = _news.cat
LEFT JOIN
_news_comments
ON
_news_comments.newsID = _news.ID
GROUP BY
_news_comments.newsID
ORDER BY
date DESC
LIMIT
10;
aber ich bekomme immer nur 3datensätze aber warum?
Kommentar