Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2004
    Posts
    30

    Unanswered: Fetching number of records

    Hi everybody,

    I have a havey table that contains about 45,000 records. So I need to display 10 records by 10. but I don't know how Am using php to display them, but i think there could be a way to limit the number of fetchd records using sql statment..

    Any help will be highly appreciated,
    dEllo.

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    You can get a "page" of 10 records like this:
    Code:
    select ...
    from
    ( select ..., rownum as rn
      from
      ( select ...
        from ...
        where ...
        order by ...
      )
      where rownum <= :pagenum*10
    )
    where rn >= (:pagenum*10)-9;

  3. #3
    Join Date
    Jul 2004
    Posts
    30
    Thank u SO MUCH andrewst .. I appreciate it alot

  4. #4
    Join Date
    Jul 2004
    Posts
    30
    Thank u SO MUCH andrewst .. IT works ...
    I appreciate it alot

  5. #5
    Join Date
    Jul 2004
    Posts
    30
    Thank u SO MUCH andrewst .. IT works ...
    I appreciate it alot

  6. #6
    Join Date
    Jul 2003
    Posts
    2,296
    I think you made yourself a new friend Tony ...
    - The_Duck
    you can lead someone to something but they will never learn anything ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •