"100 Minutes" php How to implement the page display of the picture

Source: Internet
Author: User
"100 points for help" PHP How to implement the page display of the picture?
This post was last edited by Ppsharp on 2013-02-19 23:21:07

I have a lot of pictures, a page is not finished, need to display pagination.
How to achieve the first page, previous pages, the next page, the last feature? There are also options to jump directly to one of the pages.

Beginner PHP and MySQL, do not know how to achieve this. Who can tell me how to do, or give me a similar function of the source code, thank you first!
Php


------Solution--------------------
Storing the file name in the database read database is done using the usual paging method. About pagination There's code in the sticky post that reads it.
------Solution--------------------
Get the total number of pages, define a page variable in the URL as a parameter, according to the parameters to form a SQL statement, query the corresponding picture, loop output image, based on the current page generated the previous page and the next page link.
------Solution--------------------
Service side provides a query interface can ~
e.g.
function ($index, $length); Returns the $LENGTH elements from the index value $index to the back ~

The front end makes it easy to get data within a specified range ~ Free to play ~
------Solution--------------------
Find a paging class, and slowly pondering the next!
------Solution--------------------
There are many examples of this online
------Solution--------------------
Paging the main use of the database statement is a limit if you do not understand also need to see the relevant information oh. I'm just going to get it done. Suggested download channel search in CSDN, PHP page class. Many, only classes that require the user to pass in data are available only.

  • Contact Us

    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

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.