Before update 10 data of a MySQL query...............................

update phome_ecms_news set checked=1 where id in (select id from phome_ecms_news where classid=3 and checked=0 order by id ASC limit 0,10 )
I use the above statement is to query the classid=3 and checked=0 results are sorted according to ID, and then update the 10 data, but always wrong, say "#1235 - This version of MySQL doesn't yet support'LIMIT & IN/ALL/ANY/SOME subquery'", do not know what reason

Started by Jeremiah at November 21, 2016 - 2:12 AM

zz

select * from table where id in (select id from table limit 10);

However, as long as you have another layer.. Such as:
select * from table where id in (select t.id from (select * from table limit 10)as t)

Posted by Adair at December 02, 2016 - 2:51 AM

I query and update in a table, select statement, but the update statement is not, what is the reason?

Posted by Jeremiah at December 11, 2016 - 3:43 AM

update phome_ecms_news set checked=1 where classid=3 and checked=0 order by id limit 10

Posted by Adair at December 21, 2016 - 3:57 AM

UPDATE phome_ecms_news SET checked=1 WHERE classid=3 and checked=0 order by id ASC LIMIT 10 ;
Support on the third floor !

Posted by Blithe at January 01, 2017 - 4:43 AM

update phome_ecms_news set checked=1 where classid=3 and checked=0 order by id ASC limit 0,10

Posted by Leo at January 12, 2017 - 5:07 AM