Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $categories_query = "select c.categories_id, cd.categories_name, c.parent_id
- from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
- where c.categories_id = cd.categories_id
- and c.categories_status=1 " .
- // "and c.categories_id = ptc.category_id " .
- // "and ptc.category_id = cd.categories_id " .
- // "and ptc.product_type_id not in " . $this->document_types_list . "
- " and cd.language_id = '" . (int)$_SESSION['languages_id'] . "'
- order by c.parent_id, c.sort_order, cd.categories_name";
- $categories = $db->Execute($categories_query);
- while (!$categories->EOF) {
- $this->data[$categories->fields['parent_id']][$categories->fields['categories_id']] = array('name' => $categories->fields['categories_name'], 'count' => 0);
- $categories->MoveNext();
- }
- <ul>
- <li>Menu One</li>
- <li>Menu Two
- <ul>
- <li>Submenu One</li>
- <li>Submenu Two</li>
- <li>Submenu Three</li>
- </ul>
- </li>
- <li>Menu Three</li>
- <li>Menu Four</li>
- <li>Menu Five</li>
- <li>ect...</li>
- </ul>
- <ul>
- <li>Menu One</li>
- <li>Menu Two
- <ul>
- <li>Submenu One</li>
- <li>Submenu Two</li>
- <li>Submenu Three</li>
- </ul>
- </li>
- <li>Menu Three</li>
- <li>Menu Four</li>
- </ul>
- <ul>
- <li>Menu One</li>
- <li>Menu Two</li>
- <li>Menu Three</li>
- <li>Menu Four</li>
- </ul>
- $categories_query = "select c.categories_id, cd.categories_name, c.parent_id
- from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
- where c.categories_id = cd.categories_id
- and c.categories_status=1 " .
- " and cd.language_id = '" . (int)$_SESSION['languages_id'] . "'
- " and c.parent_id in " .
- " ( select parent_id from " . TABLE_CATEGORIES . " limit 4) " .
- " order by c.parent_id, c.sort_order, cd.categories_name";
- $categories = $db->Execute($categories_query);
- while (!$categories->EOF) {
- $this->data[$categories->fields['parent_id']][$categories->fields['categories_id']] = array('name' => $categories->fields['categories_name'], 'count' => 0);
- $categories->MoveNext();
- }
Add Comment
Please, Sign In to add comment