I think I understand your problem better now;
You are using mysql_result 2 times:
Each time you use mysql_result, it advances the row pointer to the next returned row of the query result.
In this instance, I would guess that you have a unique id, ie only one row from threads will be returned.
The first time you use mysql_result, it looks to the first (and only) returned row.
The second time you call it, it looks to the second (non-existent) row, and blows up.
What you really mean, I think, is to get 2 values from this query, right?
Why not just make it explicit:
$query ="SeLECT FirstValueIWant, SecondValueIWant from threads where thread_num = $thread";
$result = mysql_query($query);
$row=mysql_fetch_array($result);
//likely this query just gets you 1 specific row, right? if multiple rows returned, you need a while loop.
echo $row['FirstValueIWant'];
echo $row['SecondValueIWant '];