Home  >  Article  >  Backend Development  >  如何用php实现上下线的标识

如何用php实现上下线的标识

WBOY
WBOYOriginal
2016-06-06 20:41:551290browse

初学小白一个,正在开发一个返点系统,核心是A用户可以自己销售也可以发展下线a/b/c并从下线销售中获益。现在遇到一个问题,怎样才能实现A和a/b/c上下线关系呢?可以有偿,谢谢。

回复内容:

初学小白一个,正在开发一个返点系统,核心是A用户可以自己销售也可以发展下线a/b/c并从下线销售中获益。现在遇到一个问题,怎样才能实现A和a/b/c上下线关系呢?可以有偿,谢谢。

搜索 “无限极分类”。

数据库中设计一个parent_id,通过parent_id可以查询到该用户的下线

无限极即可
id name pid 表设计

这就是个无限分类,和大家的答案一样。你参照下http://www.imooc.com/learn/201

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn