It seems that there are not many such code on the Internet for a PHPORACLE10G paging code. I made one myself, but the problem is that it cannot be displayed in chronological order as a whole, each page can only be displayed in chronological order. although you think of a method: first retrieve all the pages to an array, and then extract and display the pages submitted by the page from the array; however, you still want a mature paging program, or you can retrieve a php oracle 10 GB paging code by page.
It seems that there are not a lot of such code on the internet. I made one by myself, but the problem is that the whole code cannot be displayed in chronological order, and only each page can be displayed in chronological order; although I think of a method: first retrieve all the data into an array, and then extract and display the data from the array based on the page submitted by the page, I still want a mature paging program, it can also be a paging class and requires code!
------ Solution --------------------
It seems that you have not figured it out
This SQL framework is not dynamic.
$ SQL = 'select * from tbl_name order by id desc '; // your query statement
$ Pagesize = 20; // Number of page Records
$ Start = ($ page-1) * $ pagesize; // start offset
$ Sqls = <SQL
SELECT * FROM?
(
Select a. *, rownum rn?
FROM ($ SQL)?
Where rownum <$ start + $ pagesize
)
Where rn> = $ start
SQL;
Then use $ sqls as the query instruction string
That is to say:
Execute $ SQL without paging
Execute $ sqls when paging
By the way, this framework is extracted from my project. No problem
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service