Home > front end >  C # multi-stage classification table query
C # multi-stage classification table query

Time:09-18

This is a list of categories, typeid column is a parent category, 0 means no parent category,
Sixth name children's clothing, for example, the typeid is 1, then his parent's productid for 1 dress



Then this is the result of the query result how the query to the parent category into name



This




This is my background query code and front desk






Please, help me, in a hurry! The humble I shivered in the corner

CodePudding user response:

The select Amy polumbo roducttypeid, a.t ypename
Isnull ((select typename from [producttype] b where a.t ypeid=p. roducttypeid), 'no') as the typeid
The from [producttype] a
  • Related