I am having trouble adding sub-topics to my home made blog system running under PHP-Fusion CMS with PHPver7.4.16 with cgi/fcgi interface and MySQL5.7.34-log. Here are 2 images:
Here is the module that produces the output.
<?php
echo "<div class='col-sm-12'>\n";
echo "<table width='100%' border='0'><tr><td><span class='hdspan2'><b>".$locale['gb_810']."</b></span></td></tr></table>\n";
echo "<table align='center' widt
Here's sample code I wrote a few years back.
DATA
mysql> select * from category;
+----+-----------+--------+
| id | service | parent |
+----+-----------+--------+
| 1 | Cat 1 | 0 |
| 2 | Cat 2 | 0 |
| 3 | Cat 3 | 0 |
| 4 | Cat 1 1 | 1 |
| 5 | Cat 1 2 | 1 |
| 6 | Cat 2 1 | 2 |
| 7 | Cat 2 2 | 2 |
| 8 | Cat 2 3 | 2 |
| 9 | Cat 3 1 | 3 |
| 10 | Cat 1 1 1 | 4 |
| 11 | Cat 1 1 2 | 4 |
| 12 | Cat 2 3