Help: how to query this SQL PHPcode10 representative clothes 20 representative digital 30 representative furniture second-level classification 1001 representative men's clothes 1002 representative women's clothes 2001 representative digital 12002 representative digital 2 third-level classification 100201 representative women's underwear 100202 Representative Women's women...... The database has such a category ID. how should I write the value of the level-2 category under 10? I am here for help: how can I query this SQL statement?
PHP code
10 stands for clothes 20 stands for digital 30 stands for second-level classification of furniture 1001 stands for men's clothes 1002 stands for women's clothes 2001 stands for Digital 12002 stands for Digital 2 third-level classification 100201 stands for women's underwear 100202 stands for women's women ......
The database has such a category ID.
How can I write the value of the second-level classification under 10? I write select * typetabe where family_id like "10%" in this way"
In this way, we can write all the categories. what I want is how to write it as long as it has a second-level classification.
That is, only the data I want to query.
1001 represents men's clothes
1002 women's clothes
------ Solution --------------------
Select * typetabe where family_id like "10%" and length (family_id) = 4
------ Solution --------------------
All of the first-level classification like '20160301' is 10.
Like '10' with a level-1 Classification of 10
Like '10 ?? 'Level-1 classification is 10 level-2 classification
.....