Unlimited classification. Unlimited classification: the main idea is to use fid to record the upper-level ID of the class and establish the relationship between the upper and lower levels through fid and id .? Php $ connmysql_connect (localhost, unlimited root category
// Infinite classification. The main idea is this: use fid to record the upper-level ID of the class and establish the relationship between the upper and lower levels through fid and id.
$ Conn = mysql_connect ("localhost", "root", "root") or die ("Database Connection Lost ");
Mysql_select_db ("new", $ conn );
?>
Category: Function mainfl () {global $ conn; $ result = mysql_query ("select id, fid, name from a where fid = 0 order by id", $ conn ); // The default fid = 0 indicates the first level. This can be used to identify all items with fid = 0, that is, all the first-level primary classes if ($ myrow = mysql_fetch_array ($ result) {do {?>> // $ Myrow ["id"] The output primary class ID is used to prepare the query subclass. $ myrwo ["name"] primary class name // Call the sub-class function subfl and use -- Unlimited // unlimited classification. The main idea is this: use fid to record the upper-level ID of the class and establish the upper-level relationship with the id through fid. ? Php $ conn = mysql_connect (localhost, root...