Answer the question
In order to leave comments, you need to log in
Mysql NestedSet - how to select user comments + subcomments?
Tell me how to select all comments of the specified user + highlights.
sqlfiddle.com/#!2/d3aada/3 overgrowing
thanks!
Answer the question
In order to leave comments, you need to log in
hmm, based on the condition: select all comments of the specified user , I
suggest using a simple select
this query ^^ selects ALL comments of a specific user + highlights (I suspect that these are comments of a higher / lower level, but this does not change the essence, because they are also comments)
maybe Is it worth a little more detail to describe what you need?
and maybe I'm the only one who doesn't understand what the columns mean?
`root` int(10) unsigned DEFAULT NULL,
`lft` int(10) unsigned NOT NULL,
`rgt` int(10) unsigned NOT NULL,
Offtopic. And how will NestedSet react to the removal of a comment? It is necessary to set new lft and rgt when deleting?
Upd.
You need to get the user's comments and the comments attached to them, if any.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question