that query wont show the latest 10.
You will need to add an order by post.dateline (or postid, I guess) desc at the end. Also, you should use join to join tables, not where
PHP Code:
"SELECT post.*
FROM ". TABLE_PREFIX ."thread AS thread,
JOIN ". TABLE_PREFIX ."post AS post
USING (threadid)
WHERE
thread.forumid = XX AND
post.visible = 1
ORDER BY
post.postid DESC
LIMIT
10"