Strange error by sub query, works with InnoDB

Strange error by sub query, works with InnoDB

am 13.08.2006 13:34:05 von Seansan

Hi there,

I have this query below and the SELECT COUNT statements are generating
errors in MySQL and I have no clue why. I would like to be able to do
this because this also works for other DB's. Any ideas?

Kind regards, Seansan

SELECT ttrss_feeds.*,
SUBSTRING(last_updated,1,19) AS last_updated_noms,
(SELECT COUNT(ttrss_entries.id) FROM ttrss_entries,
ttrss_user_entries
WHERE ttrss_user_entries.feed_id = ttrss_feeds.id AND
ttrss_user_entries.ref_id = ttrss_entries.id AND
owner_uid = 'admin') AS total,
(SELECT COUNT(ttrss_feeds.id) FROM ttrss_entries,ttrss_user_entries
WHERE feed_id = ttrss_feeds.id AND unread = 'true'
AND ttrss_user_entries.ref_id = ttrss_entries.id
AND owner_uid = 'admin') as unread,
cat_id,
last_error,
ttrss_feed_categories.title AS category,
ttrss_feed_categories.collapsed
FROM ttrss_feeds
LEFT JOIN ttrss_feed_categories ON (ttrss_feed_categories.id =
cat_id)
WHERE ttrss_feeds.owner_uid = 'admin' AND parent_feed IS NULL