需要 mysql 的树视图帮助
我想从数据库构建一个树视图。
树视图应该从登录的用户(在会话中存储为 $UserID)开始,
从那里它应该能够
在下图中查看他的所有推荐(保存在数据库中),您将获得数据库的概述和我想要树视图的样子。
我如何对其进行编码,以便将其集成到我的网站中? 我已经阅读了树视图等,但我似乎找不到一个好的解决方案。
我还想将其限制为 10 级深度。我该怎么办?
如果有人愿意让我开始编写一些代码,我会很高兴的。
我还希望树视图逐个节点加载,而不是一次加载整个树视图,看看它如何变得非常大,并且在性能方面我仍然希望它很快。
ps:大图位于: http://imageshack.us/f/824/treeg.png /
谢谢:)
i want to build a treeview from a database.
the treeview should start with the user logged in (stored in the session as $UserID)
from there it should be able to view all his referrals (saved in the DB)
in the following image, you'll get an overview of the DB and how i want the treeview to look like.
how can i code this so i can integrate this into my website?
i've read up on treeview etc, but i can't seem to find a good solution for it.
also i want to limit this to 10 levels deep. how would i go about that?
if anybody would be kind enough to get me started with some code, i'd love that.
also i want the treeview to load node by node, instead of the whole treeview at once, seeing how it might get really big, and performance wise i still want it to be fast.
ps: bigger image at: http://imageshack.us/f/824/treeg.png/
Thanks :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看看这个项目 http://sourceforge.net/projects/dpulldown/。
它从数据库构建树结构来创建多级ajax选择器。
Take a look at this project http://sourceforge.net/projects/dpulldown/.
It builds up a tree structure from a db to create a multi-level ajax selector.