Jump to content

Pagination

- - - - -

  • Please log in to reply
2 replies to this topic

#1
kwahedi

kwahedi

    Newbie

  • Members
  • PipPip
  • 10 posts
Hi
i need to have code of pagination for my project
can some help me?????/
i want to drive out the information from my database by group number
each group have 30 person ,there for i want to 5 person in each page:rolleyes::rolleyes::rolleyes:

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
Moved to the correct forum (this is NOT a tutorial).

It will depend somewhat on your database structure, which type of database you are using for the back-end, etc.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
BlaineSch

BlaineSch

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,448 posts
For example a MSSQL page 1 with 10 results would look similar to:
SELECT
    x.*
FROM
    (
        SELECT
            *,
            ROW_NUMBER() OVER(ORDER BY id DESC) AS rowNumber
        FROM
            [table]
    ) AS x
WHERE
    x.rowNumber BETWEEN 1 AND 10
MySQL looking similar to
SELECT * FROM `table` LIMIT 0, 10





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users