我有一个示例代码
products(id, name)
1 | Apple
2 | Sony
3 | Nokia
4 | Samsung
5 | LG
6 | Motorola
7 | Ekricson
和mysql:
SELECT id, name FROM `products` AS prod
ORDER BY RAND(prod.id) LIMIT 5
当我运行代码时,结果是:
4 | ...
7 | ...
1 | ...
5 | ...
6 | ...
但接下来......结果是:
4 | ...
7 | ...
1 | ...
5 | ...
6 | ...
随机运行时 Id 不改变,如何修复 ix