3
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 has no daughter category.
Who would be the father category? id_father? and the daughter category? It was not clear.
– Clayderson Ferreira
When the category is Parent, the id_parent is 0. When the category is Daughter the id_parent is the id number of the Parent category.
– Felipe