get the latest entry

homer.favenir

Verified User
Joined
Feb 19, 2008
Messages
12
Location
manila, philippines
hi,
can anyone please help me how to get thy latest entry in my table
my query is
Code:
SELECT
a.transid,
a.artid,
b.remarks,
b.errID

FROM tbl_transactions as a
inner join tbl_errordetail as b on (b.transid = a.transid)

where a.artid = 123

i want to get the latest entry for b.errID without grouping by

thanks in advance
 
There really is no way to get the last row unless you have some sort of datetime column. You can use LIMIT 1 in your select statement.
 
Back
Top