#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Location
    Belgium
    Posts
    7
    Rep Power
    0
    Hi there!

    When I read from mysql database it shows all the records. How can i make them show by 5 each page?

    Thanx!

    -Jonathan
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15
    Use The "limit" for limited number of record display.

    I am giving a small example here

    "select * from tablename order by fieldname ascending limit 5"




    [This message has been edited by Shiju Rajan (edited March 26, 2000).]
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Location
    Belgium
    Posts
    7
    Rep Power
    0
    Hi,

    I knew the syntax in mySQL how do I process it in php? You know, the page shows 5 records and it has a link to 'next page'... I think the summertime is bad for a mans brain:-/

    -Jonathan
  6. #4
  7. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    Check out the article:
    http://www.phpbuilder.com/columns/rod20000221.php3

    This isn't 'production code' but will give you the idea of how to do it for your application.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Location
    Belgium
    Posts
    7
    Rep Power
    0
    Hi,

    Thanks it worked. Within a week my project will be done. Yieha! :-)

    -Jonathan

Similar Threads

  1. Replies: 3
    Last Post: December 27th, 2003, 04:33 AM
  2. Showing most recent records dependant upon number...
    By Jonny5uk in forum ASP Programming
    Replies: 0
    Last Post: December 24th, 2003, 06:51 AM
  3. selecting duplicate records
    By crackerweb in forum Visual Basic Programming
    Replies: 3
    Last Post: November 12th, 2003, 01:10 PM
  4. Replies: 0
    Last Post: July 22nd, 2003, 09:56 AM

IMN logo majestic logo threadwatch logo seochat tools logo