Hi,

I use ther version 4.1.11, and when I run this query :

SELECT c.id,c.subject,c.res_type,c.news_id,c.com_thread,c.timestamp +
0 as timestamp FROM comments c WHERE c.id IN (SELECT d.id FROM
comments d WHERE d.res_type=1 GROUP BY d.news_id ORDER BY d.id DESC
LIMIT 5 ) ORDER BY c.timestamp DESC;
ERROR 1235 (42000): This version of MySQL doesn't yet support 'LIMIT &
IN/ALL/ANY/SOME subquery'

Does anyone know if this limit will be lifted and when ?

Or does anyone know how to write this query in another way ?
I try to pull the last 5 comments that match "res_type=1" but with
only one by news_id and only the last 5 comments.
(I guess I could use a temp table, feed with the 5 matching id, then
join it with the comments table)

-- 
Webzine Rock : http://www.w-fenec.org/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to