Hi All,
I have a table like the following:
MsgID, ParentMsgID, Title
1, 0, Title 1
2, 1, Title 2
3, 2, Title 3
4, 1, Title 4
5, 0, New Title
6, 5, New Title 2
Basically, message 1, 2, 3, 4 belong to the same thread. 5, 6 belong to another thread.
What I'd love to have are two tables based on privous table.
MsgID, ThreadID, Title
1, 1, Title 1
2, 1, Title 2
3, 1, Title 3
4, 1, Title 4
5, 2, New Title
6, 2, New Title
ThreadID, FirstMsgID, LastMsgID
1, 1, 4
2, 5, 6
Can anyone show me a way to get those two tables?
Thanks,
tofuTnT
I have a table like the following:
MsgID, ParentMsgID, Title
1, 0, Title 1
2, 1, Title 2
3, 2, Title 3
4, 1, Title 4
5, 0, New Title
6, 5, New Title 2
Basically, message 1, 2, 3, 4 belong to the same thread. 5, 6 belong to another thread.
What I'd love to have are two tables based on privous table.
MsgID, ThreadID, Title
1, 1, Title 1
2, 1, Title 2
3, 1, Title 3
4, 1, Title 4
5, 2, New Title
6, 2, New Title
ThreadID, FirstMsgID, LastMsgID
1, 1, 4
2, 5, 6
Can anyone show me a way to get those two tables?
Thanks,
tofuTnT