Jump to content

abhijeet

Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

abhijeet's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. i have the \'category\' table in the following format ------------------------------------------- id categoryname maincatid ------------------------------------------- 1 A 0 2 B 0 3 C 0 4 D 1 5 E 4 6 F 5 ------------------------------------------- As you can see A,B and C are the parent categorie. D is the subcategory of A, E is again subcategory of D and F is subcategory of E. So the tree structure is like A-->D-->E-->F Can i write a single query in which i will specify id for F. i.e 6 and it should fetch me all parent categories upto the topmost i.e. A
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.