Sorry I didn't notice your question before, but I thought I'd point out that you can use the mysql function FROM_UNIXTIME() to convert the field, like:
Code:
SELECT FROM_UNIXTIME( lastpost ) AS lastpost_date
FROM `thread`
There's also the date() function in php which can canvert a unix time and format it just about any way you can think of (although you did way you wanted to do it in sql).