Rick - it can be done without another query! Think about it - every post replies to another, chronologically before it so higher up in the flat post list.

So, at some point earlier in the viewflat script you must already have already encountered that user and his/her userdata.

Therefore - the solution is to cache this in an array s.t $usercache[$id] = userobj or similar. Then, you can simply look it up and do the "in reply to" bit as before. <img border="0" title="" alt="[Smile]" src="images/icons/smile.gif" />