如下所示,uidStr为"5,1,3,2",则查询结果顺序也为"5,1,3,2":
SELECT *
FROM user
WHERE FIND_IN_SET(uid,${uidStr})
ORDER BY FIND_IN_SET(uid,${uidStr})
如下所示,uidStr为"5,1,3,2",则查询结果顺序也为"5,1,3,2":
SELECT *
FROM user
WHERE FIND_IN_SET(uid,${uidStr})
ORDER BY FIND_IN_SET(uid,${uidStr})