SELECT

thread.threadid
FROM thread
WHERE thread.forumid = 13
AND thread.sticky=0
AND thread.visible=1
AND lastpost >= 1023098502 AND sticky=0

   ORDER BY sticky DESC, lastpost DESC
   LIMIT 0,25
这条sql语句有误,应该是 SELECT

thread.threadid
FROM thread
WHERE thread.forumid ='13'
AND thread.sticky='0'
AND thread.visible=1
AND lastpost >= '1023098502' AND sticky='0'

   ORDER BY sticky DESC, lastpost DESC
   LIMIT 0,25