Php advanced implementation of unlimited Classification 1

Source: Internet
Author: User

1. analysis when we use php to create a website, classification is very important. The second classification is called subclassification under the classification. Currently, most websites are classified only into the third category: the first category (parent category) --> the second category (sub-category) --> the more kinship categories of the third category (Sun category), the more complex and difficult it is to control programs and databases. classification processing and control at the same level is very simple, because only one database is required to record the classification at this level, such as system and news, processing at this level is very simple, but for a website, level-1 classification is not enough, and further classification is required, such as: System --> linux, windows news --> linux news, the classification of windows news is clearer, at least understandable. The system includes linux and windows, while the news includes linux news and windows news. In order to make the information clearer, so continue to classification: linux --> System Tools, kernels, programming languages, development tools... classification to level 3, information processing will be clearer That is to say, in order to clearly process the data, the more detailed the classification is, the more convenient it is, the more convenient it is to conveniently process the information and find the required information for the purpose of the netizens, however, with the continuous classification, it will become increasingly difficult to control programs and databases. difficulty 1: how to deal with these interrelated kinship classifications in the database? Difficulty 2: How to Use php to achieve this clear relationship? This multi-classification and fine-grained classification is a problem that every php programmer must solve. It is inevitable to create a good and outstanding website classification problem, the solution to this problem is quite complicated. The biggest problem is the classification of the database. If the database is improperly processed, it will bring about a huge workload or even have to re-plan the database... this is not an exaggeration, because many people will use the first-level classification to create a database in database processing. At that time, I also used this method to process classification, because most websites are classified to the third-level, therefore, the database only needs three classification databases for processing. however, when downward classification is required, the disadvantages of this approach are revealed, because the more you divide, the more workload, the larger the program volume .. the method I want to introduce is how to use a classification database to create an infinitely downward classification method. readers who have used windows know that windows folders can create an infinitely hierarchical directory, you can continue to create a directory under the directory, so that you can continue to split it. This function is also available in Linux Directory creation. The method I introduced is the same as this method.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.