well, somewhere in your script you define the $threads variable:
Code:
$threads=$DB_site->query("SELECT * FROM thread WHERE ...
to use a join query you have to chang it into this:
Code:
$threads=$DB_site->query("SELECT thread.*,reqdata.* FROM thread LEFT JOIN reqdata USING(threadid) WHERE ...
then you don't need the query in th while loop anymore, you can acces to all data within reqdata table throug $thread variable