2
What is the best way to structure a product table where there are infinite categories and children, such as a tree? So you can do a simple autocomplete search? Thank you
2
What is the best way to structure a product table where there are infinite categories and children, such as a tree? So you can do a simple autocomplete search? Thank you
1
A possible form would be the table for categories (tb_categorias
) containing the following columns:
If idSubCategoria = 0
, she is category Father, if it’s >= 1
she is then category Son, according to the name of each category.
And in the product table:
Then just recover data! ;)
0
Tatiana, you can use "Nested Set Model" as it provides very efficient queries where each item has a single parent and zero or more children.
Maybe this can help you.
Thank you so much! I found it very cool and it seems to be simple... I will study better!!!
@Tatianamartini I found it complicated! haha but we are there p/ this! Vote on my reply and helped her, thanks.
Browser other questions tagged mysql
You are not signed in. Login or sign up in order to post.
Obliged!!!
– Tatiana Martini