php - How to design a database similar to the top three levels of navigation on Apple's official website?
習慣沉默
習慣沉默 2017-05-27 17:39:14
0
2
1124

Mac/iPad/iPhone...First-level navigation

iPad Pro/ipad/iOS 10...Secondary Navigation

Overview/Technical Specifications/Buy Button...Three Level Navigation

How should the database be designed? How are the PHP code layers assembled?

習慣沉默
習慣沉默

reply all(2)
滿天的星座

Create a product category table and a model table information table.
Mac/iPad/iPhone...the first-level navigation is stored in the product category table
iPad Pro/ipad/iOS 10...the second-level navigation is stored in the model information table

When querying, you only need to query the category as the first-level navigation.
Query the model information table as the second-level navigation and information.

PHPzhong

Thanks for the invitation!

If you just want to deal with the correspondence between level 1, 2, and 3 categories, you only need one table, and add two fields parent_id (parent class ID) and child_id (child class ID) to the table

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!