» Home » categories » Page 1
Retrieve a complete list of all Categories, Sub Categories, Sub Sub Categories, etc. in only one SQL query
by TheStu in Programming Languages

I have following table structure and data in MySQL


CatID CatName ParentCatID
-------------------------------
1 Shirts NULL
2 Short Sleev 1
3 Long Sleev 1
4 Collarless 2
5 Collar 2
6 Collarless 3
7 Collar 3
8 Square Cut 4
9 Round Cu

List head categories with their sub categories listed and under that the head categories' posts
by Denis Chaykovskiy in Programming Languages

So I want to list in every category first my headcategories (HC) and then the subcategories (SC) then the headcategories' posts.


What have I tried?
Following is what I have tried, it is good for sites that dont get new head categories, but I want something that works with all categories without having to specify headcategory and removing subcategories:


<div cl

How do I only print categories that belong to the current post? This snippet shows all the categories in the site
by maximumbob in Programming Languages

I have this snippet that shows all taxonomy list in the site, that belongs to a specific vocabulary.
Instead of printing the whole list, how do I just print the terms that belong to the node I'm actually loading?
I have a Drupal 7 installation.


This is how I print the id of the node I´m at: <?php print $node->nid;?>


<?php
$vid

Add the categories selector widget to the PAGE editor with predefined categories listed?
by CraKaJaX in Programming Languages

The following code will add the categories selector widget to the WordPress Page editor interface...


add_action('admin_menu', 'my_post_categories_meta_box');
function my_post_categories_meta_box() {
add_meta_box('categorydiv', __('Categories'), 'post_categories_meta_box', 'page', 'side', 'core');
}

What I would like to do is to figure out h


How can I create an “eBay style” hierarchy of categories and sub-categories?
by Omer72 in Programming Languages

I am building a classified-ads website using asp.net web forms and linq-to-sql.


The items for sale need to be categorised in a hierarchical manner, however, an individual item may be in multiple child categories.


For an example take a look at this battery on eBay. Notice there are two breadcrumbs:


Sound & Vision > Multipurpose Batteries & Power > Rech


MySQL Bug? mixing LEFT and RIGHT joins to list articles within categories, including empty categories
by picamiolo in Databases

I have articles, which belong to article_types, which belong to categories. Each article has a format.


I want to list all articles published by a particular author, grouped by category.


I want to show all categories, even the ones with no articles.


All articles have an article_type and all categories contain article types.


I have a query that wor


How to add all categories into an array and extract the categories names and use it with a custom meta box
by Charlie98 in Programming Languages

Basically I need to add custom meta boxes to pages and one of this options must be a list of categories from previous posts. I've managed to add the metaboxes and wrapped the categories in a array, however there must be something I missing as on the page, only the first letter of the category name is being displayed. Here's a screenshot of the result:


I can't figure it out wha


Method for Sorting a list of expense categories into specific categories
by cbot5000 in Programming Languages

I am new with SQL/Python.


I was wondering if there is a way for me to sort or categorize expense items into three primary categories.


That is I have a 56,000 row list with about 100+ different expense categories. They vary from things like Payroll, Credit Card Pmt, telephone, etc.


I would like to put them into three categories, for the sake of analysis.


dynamically display categories and sub categories within an ASCX control
by dfuze in Programming Languages

What is the best way (performance wise) to display all the categories and respective sub-categories with images when the page loads so that I may style the content with an UL LI to display inside Mega Menu?


I was thinking to run a query from the control that contains the Mega Menu which should output all the published categories and sub categories. But this will constantly go back t


PHP tutorial to build, browse and link categories and sub categories?
by rhinojosa in Programming Languages

Is there a tutorial that can help me display categories and subcategories dynamically.


Next
Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .