A php class tree (supports unlimited classification ). I recently asked a lot of questions about the infinite classification class tree, so I'm glad I wrote one myself. I just wrote it. you can use it to see how it can be implemented faster and simpler, I have posted your tree and recently asked a lot of questions about the infinite classification class tree. so I'm glad I wrote one by myself. I just wrote it. you can use it to see how it works faster
Recently, a website requires an infinitely hierarchical drop-down list, so the following works are available. At first, it seems very difficult to think of such a function. I have also done an encyclopedia before, and it also involves the classification function, but it is not an infinitely level classification, instead, we simply implemented a fixed three-level classification. at that time, we designed our own design and thought that the implementation method was too good. In fact, the three-le
Change the uchome group to an unlimited classification php and uchome
Uchomein changed the group to an unlimited category. in this document, we need to modify the space_mtag.php and spache_mtag.html files. after a long time, we have not done a good job. who has done it? help me modify it.
As follows:
Reply to discussion (solution)
The infinite classification code is as follows:
"; Foreach ($ arr as
This article mainly introduces php code for retrieving top-level category IDs for unlimited classification. For more information, see a table where ID is the category id and name is the category name, pid is the ID of the upper-level classification.
Now there is a classification ID, and the program needs to find its superior ...... The category ID, in short, is to find the ID of the top-level category.For example, the ID of "Fresh Fruit" is 13, and
Php advanced implementation of unlimited Classification 3. 3. program Control -------------------------------------------------------------- This step is the most complex and hard. First, let's take a look at step 3 that needs to be completed by the program. program Control ------------------------------------------------------------ This step is the most complicated and difficult to implement. First, let's take a look at the steps required by the pro
TreeTable is a PHP class library plug-in that can display infinite categories as tables. The classification level is represented as the column of the table, and the number of rows of the classification is the total number of table categories. The cell Display category name TreeTable provides an unlimited level of display hierarchy by merging rows and columns of cells.
1. Construct an array of ID/PID/NAME, which can be generated by the database later.
Previously, I used Ext. tree. TreePanel to bind a tree-based query. It seems that TreePanel is quite good.
Today, we will try to combine the Ext. menu. Menu menu Menu to add, delete, and modify functions, and implement unlimited binding, as shown in the following figure:
Step 1: TreePanel's unlimited Loading Design:
My data design structure is as follows:
Step 2: Obtain the cascade data structure in the b
, don't worry about it. It's Dialpad.com's free online phone number Dialpad.
It is not a software, it is just a small Java applet and does not need to download any program. Therefore, it is a new type of network phone. Its biggest advantage is that it does not have to pay any fee or unlimited call time, allow anyone to call a regular call through the Dialpad website. Haha, you can have a phone call with your friends in the United States!
Let me start
Unlimited classification, but the efficiency is not the best... Do you have code that is faster and more efficient?
Recursion will affect efficiency when there are many categories!
Please share it!
Class. SQL
---- TABLE structure 'class' -- set names utf8; create table 'class' ('id' int (10) not null auto_increment, 'name' varchar (250) character set utf8 default NULL, 'classid' int (10) default NULL, 'Port' int (10) not null default '0', primary key
Implement unlimited classification by iteration and implement hierarchical classification by generation
Speaking of the infinitus classification, I believe many people know what it is and have done it before. I also believe that the most widely used method is to implement recursion.
Recently, I also want to create a menu with unlimited classification, but I don't want to use recursion. So I need to implemen
Let's introduce some usage of unlimited classification in php, including operations on direct and unlimited classification databases and arrays. For more information, see.
Let's first look at an infinite classification of php and mysql databases.
Create a database:Id, fid, and fname (both id and fid must be numerical and the default value of fid must be set to 0;
The Code is as follows:
Copy co
This article mainly introduces two methods of designing a PHP + Mysql tree structure (unlimited classification) database, as well as analysis and discussion of advantages and disadvantages. For more information, see
This article mainly introduces two methods of designing a PHP + Mysql tree structure (unlimited classification) database, as well as analysis and discussion of advantages and disadvantages. For
At first, it seems very difficult to think of such a function. I have also done an encyclopedia before, and it also involves the classification function, but it is not an infinitely level classification, instead, we simply implemented a fixed three-level classification. At that time, we designed our own design and thought that the implementation method was too good. In fact, the three-level classification is just a special case of an unlimited classif
The purpose of Ubuntu is to link and share with others. Ubuntu has unlimited charm. Ubuntu open source code is always free of charge. An open platform is provided to the Ubuntu alliance and Ubuntu enthusiasts, the Software Development SDK package used is provided to programmers completely and unconditionally, and all development achievements are unconditionally shared and disseminated on the Internet. Today, the number of registered users in the Ubunt
There are roughly three methods for unlimited php classification,
1. The database performs a unique index by setting the parent class ID, and then uses the recursive call of the function to implement unlimited classification;
2. The database is designed to be arranged in a specific format, and then use mysql to query the key function: concat. Program Implementation is relatively simple;
3. The third type is
Php unlimited classification program. In the past, I often introduced the issue of infinite classification. In most cases, we use php recursion. the infinite classification introduced today does not require recursion, the method is very simple. we need to introduce the infinite classification problem frequently before. In most cases, we use php recursion. the infinite classification introduced today does not require recursion, the method is simple. if
There are already a lot of PHP unlimited classification code on the Internet, and the explanation is also in place, here, I would like to share with you the following piece of code that makes it easy to use:
The code is as follows:
/////////////////// Database design and example of unlimited classification//////////////Mysql> create database db_kind;Query OK, 1 row affectedMysql> use db_kind;Database chan
Recently, a website requires an infinitely hierarchical drop-down list, so the following works are available. At first, it seems very difficult to think of such a function. I have also done an encyclopedia before, and it also involves the classification function, but it is not an infinitely level classification, instead, we simply implemented a fixed three-level classification. at that time, we designed our own design and thought that the implementation method was too good. In fact, the three-le
news' is 2, so its f_id is set to 2.Insert into 'class' ('id', 'F _ id', 'name') VALUES (3, 2, 'php6. 0 '); // Similarly, we can insert categories all the time to achieve unlimited classification.// We can find that the key to inserting a category is to find the id of the parent class of the category and use it as the value of the f_id field of the category.// Assume that you want to insert the same level of classifier as 'news'. that is to say, it i
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.