Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
This is how it will be
$rows = Yii::$app->db->createCommand('
SELECT node.id, node.name, node.level
FROM ns_tree AS node, ns_tree AS parent
WHERE node.lft BETWEEN parent.lft AND parent.rgt AND parent.id = 2
ORDER BY node.lft
')->queryAll();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question