Help for this page
select max(RecordTime) from tbl_loan where UserId = 2 Group By LoanId
select * from tbl_loan ... ... $db->execute($var);