I need some help.
I have a category table that has the fields:
- id;
- name;
- description;
- id_category_name;
- id_user;
I want to get the category name when the category_id id is equal to the category id.
Example:
The category Car has the father category Vehicles id = 4; name = Car; description = any; id_categoria_pai = 1 (vehicles); id_user = 1;
I need to display the name of the parent category, in this case, Vehicle.
How can I do this? I tried it anyway and I can not.
Or do I create the separate tables? I do not think so.
Thank you!