Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select * from figures
- inner join figures_categorie on figures.categorie=figures_categorie.id
- where categorie=1
- or categorie in
- (select id from figures_categorie as cat1 where cat1.parent=1
- or cat1.parent in
- (select id from figures_categorie as cat2 where cat2.parent=1)) ;
- select * from figures
- inner join figures_categorie on figures.categorie=figures_categorie.id
- where categorie=1
- or categorie in
- (select id from figures_categorie as cat1 where cat1.parent=1
- or cat1.parent in (select id from cat1))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement