SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jul 2010
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Query subcategories in SQL

    Hi I'm a relatively new to mySQL so please forgive me if this is very simple to achieve but I've been struggling with this. I'm trying to create a crumbtrail on an online store, effectively showing the current product selected, it's category then it's parent category. Where I'm struggling is querying the sub category, in the attached screen shot it would be 'just landed' or 'christmas turkeys'.

    What SQL query would I use to extract sub category information from the database.

    Thanks for your help

    Neil
    Attached Images Attached Images

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,508
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    Take a look at this post, especially the article linked to in the first reply: http://www.sitepoint.com/forums/show...light=category

  3. #3
    SitePoint Member
    Join Date
    Jul 2010
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's great, thank you. I didn't expect a reply so quickly.
    I've got a lot to learn but I think this forum will be a big help.

    Neil


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •