apoligies if this query in wrong section .....

Discussion in 'Database' started by steve0071972, Feb 12, 2009.

  1. steve0071972

    steve0071972 New Member

    Joined:
    Feb 12, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Hi, if this query is in the wrong section I do apologise. My query is this, I have written a database for an small company involving personal records. The database consists of the normal tables (first name, surname, contact details, phone number, email address, work number, department etc...). Now when I search the surname smith (for example) 5 smith records are displayed on the same screen, which means I have to scroll down to view them all. Is there a way that one record could be displayed at a time, then you press a button which will then display the next record and so on until all the smith have been displayed on the same screen without scrolling down. Hope you all understand what I mean. Thanks in advance
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Which Database you are using.

    LIMIT 1 can be an option.
     
  3. steve0071972

    steve0071972 New Member

    Joined:
    Feb 12, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    mysql .....

    I'm using a mysql database with php, html & css files
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Use LIMIT 1 and that would only give you one record.
     
  5. steve0071972

    steve0071972 New Member

    Joined:
    Feb 12, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    I'm not quite sure where to insert limit 1 yet but I'll work on that, so it's as simple as that, by inserting limit 1 it will display one record at a time and go to the next record when I click on a button. Knowledge certainly is power cheers mate I'll try that this afternoon
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice