划分搜索结果 [英] Dividing up search results

查看:57
本文介绍了划分搜索结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我有一个php脚本从数据库中检索列表然后在页面上显示,问题是有时列表的数量可能超过100或更多。

所以我想要做的是将结果列表分成多页或可能在一个页面上,但限制结果在任何时候都可见,即你显示前25个列表和下一个人点击页面,它只是更新页面与接下来的25个列表;虽然有一个问题是我不确定如何识别当前显示的列表编号,我的脚本只是将信息转储到页面上,现在我试图将其清理一下。


如何实现这一点的任何指导或帮助都将非常感谢,

解决方案

这称为Paging,有很多有用的文章可供选择通过 Google


从那里开始,但如果您遇到任何问题,请告诉我们,我们会尽力提供帮助。


谢谢堆,这看起来正是我想要的,哦你也知道一种方法来告诉你得到多少搜索结果而不是实际得到搜索结果。

我想我需要找到分页代码的结果数量。


再次感谢堆,

这样的东西应该适用于大多数SQL数据库。

展开 | 选择 | Wrap < span class =codeDivider> | 行号


Hi all, i have a php script which retrieves listings from a database and then displays them on a page, the problem is that sometimes the number of listings can be in excess of 100 or more.

So what i wanted to do was split up the resultant listings onto more than 1 page or perhaps on a single page but limit the results visible at any one time, i.e. you show the first 25 listings and the person hits next page and it just updates the page with the next 25 listings; though one problem is that im not sure how to identify which listing number is currently been displayed, my script sort of just dump the information onto a page and now im trying to clean it up a bit.

Any direction or help on how to acomplish this would be great thanks,

解决方案

This is called Paging, and there are a number of useful articles about this available via Google.

Start there, but if you run into any problems, let us know and we will try to help.


Thanks heaps this looks exactly what i want, oh also do u know of a way to tell how many search results you get instead of actually getting the search results.
I think i need do find the number of results for the paging code.


Thanks again heaps,


Something like this should work on most SQL databases.

Expand|Select|Wrap|Line Numbers


这篇关于划分搜索结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆