Quote:
Originally Posted by kofoid
I would like to run a query in mySQL that would show me all of the threads started by a certain user and all of the responses tied to the thread. Just like "Find all threads started by XXX" in a member's profile. Can someone help me out? Thanks in advance!
|
if its just the threads you want then its
[sql]select * from thread where postuserid=userid[/sql]
If you want all the posts in all these threads then its
[sql]select post.* from post p
join thread t using (threadid)
where postuserid=userid
order by p.threadid, p.postid[/sql]