search
  • Sign In
  • Sign Up
Password reset successful

Follow the proiects vou are interested in andi aet the latestnews about them taster

Home PHP Libraries Other libraries PHP unlimited classification method class
PHP unlimited classification method class
<?PHP
header("Content-type: text/html; charset=utf-8");
 
$link = mysql_connect('localhost','root','eric') or die(mysql_error());
mysql_select_db('sortclass',$link);
 
class SortClass{
  var $data = array();
  var $child = array(-1=>array());
  var $layer = array(-1=>-1);
  var $parent = array();
  var $link;
  var $table;
  function SortClass($link, $table){
    $this->setNode(0, -1, '顶极节点');
    $this->link = $link;
    $this->table = $table;
    $node = array();
    $results = mysql_query('select * from '.$this->table.'',$this->link);
    while($node = mysql_fetch_assoc($results)){
      $this->setNode($node['cid'],$node['pid'],$node['cname']);
    }
  }

This is an implementation library for PHP infinite splitting, with two methods: recursive and non-recursive. Friends who need it can download it and use it.


Disclaimer

All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn

PHP MySQL method to implement unlimited classification columns, _PHP tutorial PHP MySQL method to implement unlimited classification columns, _PHP tutorial

12 Jul 2016

PHP MySQL method to implement unlimited classification columns. PHP MySQL's method of implementing unlimited classification columns. This article describes the method of PHP MySQL's implementation of unlimited classification columns. Share it with everyone for your reference, the details are as follows: A very simple

How to enable Pico.css on demand in a project without polluting styles globally How to enable Pico.css on demand in a project without polluting styles globally

09 Feb 2026

Pico.css has provided the pico.conditional.min.css version since v2, which only takes effect on elements with class="pico" added, completely solving the problem of style conflicts with other UI libraries.

What is the difference between mysql full database recovery and single database recovery_mysql operation method instructions What is the difference between mysql full database recovery and single database recovery_mysql operation method instructions

09 Feb 2026

Full database recovery is to directly import the SQL file generated by mysqldump--all-databases, covering all libraries (including system libraries). The risk is high, but it is suitable for the entire instance crash; you must check the CREATEDATABASE statement, target library list and character set, SQL mode, permission library synchronization and other details.

How to secure your MySQL server? (Security Hardening Checklist) How to secure your MySQL server? (Security Hardening Checklist)

26 Feb 2026

MySQL security hardening requires disabling anonymous users and test libraries, restricting root remote login and creating dedicated management accounts, forcing TLS encryption, closing local_infile and other dangerous functions, and regularly checking key security variables.

How to use the filter_var function for validation in PHP? How to use the filter_var function for validation in PHP?

09 Nov 2025

The filter_var() function is used to verify and clean data. It supports email, integer, URL, IP and other format verification. It is implemented through built-in filters such as FILTER_VALIDATE_EMAIL without the need for external libraries.

How to correctly load JARs with embedded dependencies (such as 'fat JARs') in Java applications How to correctly load JARs with embedded dependencies (such as 'fat JARs') in Java applications

10 Feb 2026

This article explains in detail why the "fat JAR" containing the libs/ directory cannot be directly loaded as a normal dependency, and the standardized practice plan for safely introducing external libraries in SpringBoot, Tomcat and other environments.

Show More