My idea is to create a message table with an id field and a pid field. If it is the first-level message pid field, it is set to 0, otherwise, store the id value of the previous layer. Recursively obtain the depth of each line When retrieving data. Add spaces before the output according to the depth ....
Functions similar to the above
My idea is to create a message table with an id field and a pid field. If it is the first-level message pid field, it is set to 0. Otherwise, it stores the previous layer of id value. Recursively obtain the depth of each line When retrieving data, and add spaces before the output according to the depth.
This is probably the case for tables.
Id pid content
1 0 messages 1
2 0 messages 2
3 0 messages 3
4 3 messages 4
5 4 leave a message 5
It seems that the page flip function is not very easy to do. I don't know where to improve it?
I don't know if there are any other good methods. I hope to give me some ideas!
Reply content:
Functions similar to the above
My idea is to create a message table with an id field and a pid field. If it is the first-level message pid field, it is set to 0. Otherwise, it stores the previous layer of id value. Recursively obtain the depth of each line When retrieving data, and add spaces before the output according to the depth.
This is probably the case for tables.
Id pid content
1 0 messages 1
2 0 messages 2
3 0 messages 3
4 3 messages 4
5 4 leave a message 5
It seems that the page flip function is not very easy to do. I don't know where to improve it?
I don't know if there are any other good methods. I hope to give me some ideas!