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 php Limit function to fing last record

    can this code work in finding last record of royalty Creditor given country
    state, city

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

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,978
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    This is identical to your other thread posted here, with the exception of being in DESC order.
    This also has nothing to do with PHP.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 


  •  

    Posting Permissions

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