关于mysql_data_seek分页的有关问题

WBOY
Release: 2016-06-13 13:30:46
Original
865 people have browsed it

请教高手关于mysql_data_seek分页的问题
初学PHP,在网上搜索了一下mysql_data_seek的用法,也大概知道了原理,但是实际做分页遇到一个坎,怎么也过不去。
我页面分页包括参数都已经做好了,就是显示记录的时候不灵,用下面这个语句出现的结果是:越到后面的页,记录数越少。
mysql_data_seek($result,($page-1)*$pagesize);

请教高手帮忙。谢谢。

------解决方案--------------------
分页应该是:
select * from tablename where **** order by ** limit ($page-1)*$pagesize,$pagesize;
------解决方案--------------------
每次分页都要查询数据库。

select * from tablename where **** order by ** limit ($page-1)*$pagesize,$pagesize;
这只会查询出当前的记录,而不会都查出来。
你似乎把所有数据都查出来了

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!