简体   繁体   English

节点在MySQL中是什么意思?

[英]What does node mean in MySQL?

Could anyone explain what node means in MySQL? 谁能解释节点在MySQL中的含义?

This one is talking about nested set. 这是谈论嵌套集。

I am reading a document from Codeigniter's wiki and I am not sure what I am supposed to add for $node. 我正在从Codeigniter的Wiki中阅读文档,但不确定应该为$ node添加什么。

getSubTreeAsHTML (line 704)

Renders the fields for each node starting at the given node

    * return: Sample HTML render of tree

string getSubTreeAsHTML (array $node, [array $fields = array()])

    * array $node: The node to start with
    * array $fields: The fields to display for each node

The code you are looking at is part of BackendPro . 您正在查看的代码是BackendPro的一部分。 The full code of the function can be viewed here . 该功能的完整代码可在此处查看

"Node" in this case refers to a data node of a nested set . 在这种情况下,“节点”是指嵌套集的数据节点。 Nested sets are nice because they allow you to quickly select a whole branch of a hierarchy with only the starting node. 嵌套集很不错,因为它们使您可以快速选择仅具有起始节点的层次结构的整个分支。

It looks like the function specified renders part of a tree in HTML starting at the node you specify. 看起来指定的函数从指定的节点开始以HTML形式渲染树的一部分。 The BackendPro interface must render hierarchical data somewhere. BackendPro接口必须在某处呈现层次结构数据。

EDIT : Nested sets are not a MySQL-only concept, but there is a good article about nested sets and MySQL here: 编辑 :嵌套集不是仅MySQL的概念,但这里有一篇有关嵌套集和MySQL的好文章:

http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/ http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM