MySQL Advanced List - Breadcrumbs?

5 posts by 2 authors in: Forums > CMS Builder
Last Post: May 25, 2012   (RSS)

By Perchpole - May 25, 2012

Hello, All -

I'm setting up a list for an editor using an advanced MySQL query. The query pulls selected categories into a dropdown list.

Truncated example...
SELECT num, name
FROM `<?php echo $TABLE_PREFIX ?>category`


Everything works fine. The only problem is I would like to make the list more readable by using breadcrumbs.

Sort of: parentCategory: parentCategory: Category

This is already possible using the less advanced list creator - by selecting "breadcrumb" as the label.

How do I create the same kind of output manually?

:0)

Perch

Re: [Dave] MySQL Advanced List - Breadcrumbs?

By Perchpole - May 25, 2012

Hi, Dave -

My query is fairly simple but I need to use a WHERE clause - hence the use of the advanced SQL editor.

The resulting list of category names is pretty long. It would be alot easier to read if the list were ordered in the same way as breadcrumbs - if only to make it easier to identify the sub-catgeories.

:0/

Perch

Re: [Perchpole] MySQL Advanced List - Breadcrumbs?

By Dave - May 25, 2012

Hi Perch,

Would this work?

SELECT num, breadcrumb
FROM `<?php echo $TABLE_PREFIX ?>category`
ORDER BY breadcrumb


Or if not, let me know what else you'd need it to do. Thanks!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] MySQL Advanced List - Breadcrumbs?

By Perchpole - May 25, 2012

(Slaps head) Oh, what a numpty....

Thanks, Dave.

:0)

Perch