Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Location
    Malaysia
    Posts
    3

    Unanswered: How to get the first record that meet my criteria??

    Hello Guys,
    I have table called Gateway with three fields: Aliase_No, Gateway_IP and Gateway_MAC. I want to retrieve the first record that its Gateway_IP is 0.0.0.0, so anyone can tell me what is the SQL statement that should I write to get that record???


    Thanks
    Bassam72

  2. #2
    Join Date
    Jan 2004
    Location
    Germany
    Posts
    167
    Code:
    SELECT * FROM table WHERE Gateway_IP = '0.0.0.0' LIMIT 1
    board.perl-community.de - The German Perl-Community

  3. #3
    Join Date
    Jun 2003
    Location
    Minnesota
    Posts
    61
    you dont need the LIMIT at the end just: SELECT * FROM $table WHERE Gateway_IP='0.0.0.0'

    Well I guess you could add it for security reasons.
    Mr. Lars

Posting Permissions

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