这样子的表 如果做无限分类应该怎样写解决思路

WBOY
Release: 2016-06-13 12:55:49
Original
780 people have browsed it

这样子的表 如果做无限分类应该怎样写
具体新闻页表  

cate_id ------当前新闻父分类id
subcate_id -----当前新闻分类id




新闻分类表

cate_id------------分类id (包括所有分类及子分类)


pid    -------------当前分类的上级父分类id



我想把他弄成无限分类,应该怎样循环?才能列出所有分类并排序,还能列出相关分类下新闻
------解决方案--------------------
递归
或者无递归http://topic.csdn.net/u/20110728/15/eadffb68-5eb6-40d8-9ec1-2bc439f45322.html
------解决方案--------------------
你目前是纯父子值分类,不递归是不行的

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!