Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jul 2010
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Using mysql limit functon to locate first record

    $SQLDISTRIBUTOR = " SELECT * FROM DISTRIBUTOR ";
    $SQLDISTRIBUTOR.= " WHERE COUNTRYCOD =" . $_SESSION['COUNTRYCOD'];
    $SQLDISTRIBUTOR.= " AND STATECOD =" . $_SESSION['STATECOD'];
    $SQLDISTRIBUTOR.= " AND CITYCOD =" . $_SESSION['CITYCOD'];
    $SQLDISTRIBUTOR.= " ORDER BY ACCOUNT_NUMBER ASCENDING LIMIT 1 ";
    $FDISTRIBUTOR = mysql_query( $SQLDISTRIBUTOR, $CON );

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,028
    Thanks
    75
    Thanked 4,325 Times in 4,291 Posts
    Is there a question in there?

    And why are you still using obsolete old mysql_query ???
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

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