Home > Backend Development > PHP Tutorial > 网页分页有关问题,请高手指教

网页分页有关问题,请高手指教

WBOY
Release: 2016-06-13 13:28:38
Original
889 people have browsed it

网页分页问题,请高手指教
我从A页面根据条件查询数据,数据在B页面进行显示,然后在B页面进行分页显示,第一页没有问题
select * from user_info where user_sex='1' limit 0,2 
每页显示两条数据
user_sex后面的数据是A页面通过form传递过来的
然后第二页的时候,代码就变成了
select * from user_info where user_sex='' limit 2,2 
也就是说user_sex后面的值没了,因为A页面没有再传递过来
那么这种情况下,应该怎样来处理呢?或者我的方法本来就用错了?

------解决方案--------------------
通过 url 参数或session传值
------解决方案--------------------

探讨

今天没时间了,下周一给你写个函数!!
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 admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template