I have a database with the following columns:
|id|id_pai|nome_categoria|
+--+------+--------------+
|01| 0 | Eletronicos |
|--+------+--------------+
|02| 01 | Notebook |
|--+------+--------------+
|03| 0 | Livros |
+--+------+--------------+
|04| 03 | Romance |
+--+------+--------------+
I want to return a table in html with name only of the parent category and a link to delete, but the link can only appear if the category does not have a child category.