Article suggestions
  1. Home
  2. Section: Developer Hub
  3. How categories and subcategories are related to a member's profile in MySQL

How categories and subcategories are related to a member's profile in MySQL

How categories and subcategories are related to a member's profile in MySQL
  • avatar
Written by Chan Nier
Updated on February 19, 2025

 Link: https://support.brilliantdirectories.com/support/solutions/articles/12000035993

  • Table *list_professions* is the table that contains all the information related the main categories
  • Table *users_data* column *profession_id* this is the column that store the main category *ID* for the user
  • Table *list_services*  is the table that contains all the information related the subcategories

Important columns to understand from this table:

  • *service_id=* The id of the services or sublevel
  • *profession_id=* Is the id of *(main_category)* he belongs to. We are gonna call him *grandPa*
  • *master_id=* Is the parent he belongs to this is for sub-sub categories

Example:

------------

*Code* will have a profession_id = 5 on table list_profession

Now you create 2 subcategories on table list_services

*PHP* will have a *service_id = 10* and will have a *profession_id = 5* because he belongs to *CODE* and a master = 0 (the 0 means he is a subcategory).We are gonna call him *Father*

*CakePHP* will have a *profession_id = 5* because he belongs to *CODE* and a master = 10 (the 10 means he is a sub-sub category and his father is PHP).We are gonna call him *SON*

-----

SO:

Code will be grandPa

PHP will be Father

CakePHP will be son

--------------------------

Table *rel_service* is the one the connect a subcategory with a member the important columns are *user_id* and *service_id*


Thank you for leaving a rating!
Did you find this article helpful?
0 out of 0 people found this article helpful so far
Can't find what you're looking for? Get in touch
How can we help?
Send your question below and we'll get back to you as soon as possible.
Cancel
translation missing: en.kb.default.contact_form_error
×
Thanks for your message!
Thanks for your message!
×