Results 1 to 3 of 3

Thread: [RESOLVED] Complex Question

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2005
    Location
    United States
    Posts
    157

    Resolved [RESOLVED] Complex Question

    Hello
    I have some names in my database.
    And I want to show them in pages not single page (by using PHP) and each page contains 500 names only.
    So, there will be (n) pages.

    Example: If I have 2600 names, there will be 6 pages (Page 6 will contain 100 names only).

    The question is: how can I know number of pages (n) if the number of names is indivisible to 500? (such as 2600-2650-2700... and more).

    If the number of names is divisible to 500 (such as 2500), n=2500/500=5 pages (it's very simple).

    Anybody help me, please.
    If anybody didn't get it, I'll explain more.

    Thanks & Regards

  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Complex Question

    You need to have a look into pagination. There is an example and function in the thread below:

    http://www.vbforums.com/showthread.p...51#post1988751
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2005
    Location
    United States
    Posts
    157

    Re: [RESOLVED] Complex Question

    Thanks
    It's a good example.

Posting Permissions

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



Click Here to Expand Forum to Full Width