ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Query Help

September 24, 2009 4:08pm

Subscribe [2]
  • #1 / Sep 24, 2009 4:08pm

    2techchicks

    49 posts

    I’m trying to write a query that will show a list of categories and their descriptions.  Here’s what I have so far. The category name works fine, but I’m not sure what the proper variable is for the description.

    {exp:query sql="select cat_id, cat_name, cat_url_title, cat_order
    from exp_categories
    where site_id='1' and group_id='6' and parent_id='54'
    order by cat_order asc"}
    <H1><a href="http://{site_url}index.php/site/mis2/C{cat_id}">{cat_name}</a></H1>
    {cat_desc}
    <hr>
    {/exp:query}

    Thanks!

  • #2 / Sep 24, 2009 4:15pm

    Ingmar

    29245 posts

    ... but I’m not sure what the proper variable is for the description.

    It’s ‘cat_description’. You can always find out by using the CP’s SQL Manager. Moving to Howto.

  • #3 / Sep 24, 2009 4:25pm

    2techchicks

    49 posts

    Got it, thank you!  😊

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases