Submit Your Article Forum Rules

+ Reply to Thread
Results 1 to 2 of 2

Thread: Pages based on database and navigation buttons

  1. #1
    Junior Member SmogTheCat is an unknown quantity at this point
    Join Date
    Aug 2005
    Posts
    1

    Pages based on database and navigation buttons

    I've a web site based on php and mysql database.
    I create a web page for each record of the database and an "index" page for all records, sorted by country ann name.
    You can see records divided by country or by name.

    I'd like to add in every web page bottons like "next" and "previous" for visitng pages without come back to the "index" page every time.
    How can I do this?

  2. #2
    Senior Member nottheusual1 is an unknown quantity at this point
    Join Date
    Jun 2004
    Posts
    237
    Something along this line would work:

    Next record:
    SELECT * FROM table WHERE record_id > $current_id ORDER BY record_id LIMIT 1

    Previous record:
    SELECT * FROM table WHERE record_id < $current_id ORDER BY record_id LIMIT 1

    Of course, sub your nomenclature for table, record_id, etc.

    We use a product called CodeCharge to do a bunch of our PHP coding. Take a look:

    http://www.codecharge.com

    Need very few programming skills to create very useable stuff in about 8 languages (PHP, .NET, ASP, etc.)
    :not_the_usual1
    [you decide]
    ________________
    All in my opinion, which, when combined carefully with a $1 bill, gets you a cup of coffee at the corner store.

+ Reply to Thread

Similar Threads

  1. Web based image database
    By PilotPete in forum Database Discussion Forum
    Replies: 8
    Last Post: 02-22-2007, 08:48 PM
  2. Javascript Navigation Buttons.
    By adbart in forum Search Engine Optimization Forum
    Replies: 9
    Last Post: 01-08-2007, 09:48 PM
  3. Help with Relative paths + navigation - php template pages
    By WomenXtra in forum Web Programming Discussion Forum
    Replies: 5
    Last Post: 09-05-2006, 05:54 PM
  4. Need a solution to control a navigation table on all pages
    By jawn_tech in forum Web Programming Discussion Forum
    Replies: 3
    Last Post: 12-27-2004, 10:30 AM
  5. Database programmer needed (US based)
    By natim in forum Services for Sale/Hire
    Replies: 4
    Last Post: 11-07-2004, 04:12 PM

Posting Permissions

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