469,160 Members | 1,549 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,160 developers. It's quick & easy.

Strange error by sub query, works with InnoDB

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

Aug 13 '06 #1
0 1792

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Jeremiah Jacks | last post: by
reply views Thread by Richard Gabriel | last post: by
reply views Thread by Morten Gulbrandsen | last post: by
reply views Thread by Morten Gulbrandsen | last post: by
1 post views Thread by daniel kern | last post: by
3 posts views Thread by Matias Silva | last post: by
5 posts views Thread by parwal.sandeep | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.