[wp-hackers] Retrieving all the comments in a thread

Pau Amma pauamma at gundo.com
Mon Sep 19 18:59:42 UTC 2011


On Mon, September 19, 2011 6:21 pm, Dino Termini wrote:
> - post
> -- comment 1 [ID = 1]
> --- reply 1 to comment 1 [ID = 2]
> --- reply 2 to comment 1 [ID = 3]
> --- reply 3 to comment 1 [ID = 4]
> -- comment 2 [ID = 5]
> -- comment 3 [ID = 6]
> --- reply 1 to comment 3 [ID = 7]
> --- reply 2 to comment 3 [ID = 8]
> ---- reply 1 to reply 2 to comment 1 [ID = 9]
> ---- reply 2 to reply 2 to comment 1 [ID = 10]
>
> Given any comment ID, I'd like to get all the comment IDs in the same
> thread. So for ID = 3, I'd get {1, 2, 3, 4},

For ID=10, are you interested in {8, 9, 10} or in {6, 7, 8, 9, 10}?



More information about the wp-hackers mailing list