Nice idea, however IMO you really should have some sort of limit on the number of threads, you really don't want to be showing hundreds of threads on the profile page, a counter a say the last X threads would be better.
Also this will get threads that are in private forums, not good
One last thing :P The second query is a waste, why not just increment a variable in with each iteration of the while loop? Much more efficent. Remember query_first to, thats a query were it should be used on to save extra coding