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

Take a look at this post, especially the article linked to in the first reply: http://www.sitepoint.com/forums/showthread.php?824970-Build-linkable-breadcrumb-from-DB&highlight=category

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