1
这个问题很容易修复客户端。但是为了提高性能,我想直接将其写入数据库。在一个查询中订购混合型混合mysql搜索结果?
LIST a
+------+-------+-------+
| name | score | cre |
+------+-------+-------+
| Abe | 3 | 1 |
| Zoe | 5 | 2 |
| Mye | 1 | 3 |
| Joe | 3 | 4 |
想要检索没有重复的加入混合结果。
Zoe (1st highest score)
Joe (1st last submitted)
Abe (2nd highest score)
Mye (2nd last submitted)
...
客户端我自己采取每个搜索,并通过它们一步。 但在100.000+以上它变得尴尬。为了能够使用LIMIT功能将会使事情变得更加轻松!
SELECT name FROM a ORDER BY score DESC, cre DESC;
SELECT name FROM a ORDER BY cre DESC, score DESC;
Hello Fredrik,你准确的需要你解释一下吗? – Karthik 2010-04-19 11:38:59