1
Talk about beauty?
I’m doing an infinite category system, so the table has the code and code of the parent category. I wanted to relate these two fields for when I delete a category the child is deleted tbm, so I don’t need to treat via code.
But how do I do that? Because imagine that the parent code needs to be registered and if the category is the highest level will not have father, giving error in the key.
Thank you.
Foreign Key no campo categoria_pai > e usar: ON DELETE CASCADE
? Could put the table structure together with your question?– Rafael Withoeft