Vielleicht so...
Alles ausgeben und einzelnd zählen...
SQL-Code:
SELECT a.article_id, a.title, COUNT(*) AS anzahl
FROM articles a
INNER JOIN articles_data ad
ON a.article_id = ad.article_id
WHERE ad.show_flag = 0
AND ad.active = 1
GROUP BY a.article_id, a.title
ORDER BY MAX(ad.date) DESC
Nur zählen, was auf die Suche passt...
SQL-Code:
SELECT COUNT(*) AS anzahl
FROM articles a
INNER JOIN articles_data ad
ON a.article_id = ad.article_id
WHERE ad.show_flag = 0
AND ad.active = 1
AND ( a.text LIKE '%blubb%'
OR a.title LIKE '%blubb%')
GROUP BY a.article_id, a.title
Gruss
Thorsten