你们有几个问题要处理!我建议你们一步一步地走下去。
<强势> 第一期: 强势> 导致他们已经看到不再出现
- Every item returned, store it in one array. (assuming the index
id
on the example)
- When the user goes to the next page, pass to the query the NOT IN:
< 强度 > MySQL 查询 强度 >
SELECT * FROM table WHERE id NOT IN (1, 14, 25, 645) ORDER BY RAND() LIMIT 0,10;
what this does is to 匹配不是 1, 14, 25 或 645. 的所有 id
。
就性能问题而言,<强>: 强> 以记忆高效的方式
SELECT RAND( )
FROM table
WHERE id NOT
IN ( 1, 14, 25, 645 )
LIMIT 0 , 10
显示0至9行(共10行,查询用了0.0004秒)
<强 > 和 强 >
SELECT *
FROM table
WHERE id NOT
IN ( 1, 14, 25, 645 )
ORDER BY RAND( )
LIMIT 0 , 10
显示0至9行(共10行,查询用了0.0609秒)
所以,不要使用命令 由RAND (), 最好使用 SELECT RAND () 。