【发布时间】:2015-12-17 09:54:24
【问题描述】:
我试图根据我正在使用的查询保持分页,但我的问题是它仅适用于分页的第一页,之后查询恢复为没有过滤器的标准查询(第一页显示我的过滤器,但第二页显示所有结果)。我想知道当我点击我的页面时是否有一种有效的方法可以保留我过滤后的查询,我现在只是不知道如何实现这一点。我使用 dig 样式分页?
【问题讨论】:
-
@RiggsFolly 分页效果很好,但是当我通过查询语句中的输入进行过滤时,过滤查询的分页仅在第一页有效,但是当我转到第二页时,mysql 查询恢复为标准一(不带过滤器)
-
所以给我们看代码,否则我们只能猜测。人们很快就会对一个他们无法回答的问题失去兴趣,很快这个问题就会被
Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers.关闭,请参阅:How to create a Minimal, Complete, and Verifiable example. -
我认为 15 分钟应该足以为您的问题添加一些代码。由于您还没有这样做,我假设您不会这样做。您之前的 2 个问题的细节也很短,所以我建议您阅读 How to ask a good question 和 the perfect question 如果您想充分利用 SO
标签: php mysql filter pagination