using php Limit function to fing last record
can this code work in finding last record of royalty Creditor given country
$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 );
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.
|All times are GMT +1. The time now is 05:13 AM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.