SELECT tid as id,subject as name,lastpost as value FROM pw_threads WHERE tid IN($tids)
SELECT tid as id,subject as name,lastpost