how to get last record from database?

admin

Administrator
Staff member
hi :) all i want is to retrieve date and title of last post added to the table (and later maybe couple things more ;) but mysql dosent accept that syntax

SELECT LAST(data) AS data, LAST(title) AS title FROM posts WHERE nrforum=1;

also i'd tried LAST_INSERT_ID but id gives me date of last post, but title returns 0. dunno what to do, so any help will be much appreciated
 
Back
Top