3 ms·
I have never used FIND_IN_SET. But I use FIELD() http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_field http://dev.mysql.com/doc/refman/5.
by learnalist 17y ago
I have never used FIND_IN_SET.
But I use FIELD()
http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_field http://dev.mysql.com/doc/refman/5.0/en/string-functions.html...
SELECT FROM x WHERE id IN(9,4,22,38,4,..)
ORDER BY FIELD(`id`, 9,4,22,38,4,..)
That said, I dont know if sql or php is quicker.