1 Reply Latest reply on Dec 3, 2008 12:57 AM by Daverms

    category & sub category

    thenotorious_flag Level 1
      Hi I have table where i want to display the categories with parent id 0 and When parent id is 1 or 2 and so on...

      it should display as :

      autos/auto1
      autos/cars

      Etc:

      My database table is like this:

      cid int(11) No auto_increment
      parentid int(11) No 0
      img varchar(30) latin1_swedish_ci No
      title varchar(40) latin1_swedish_ci No
      cdesc text latin1_swedish_ci No
      hits

      Currently it is diaplying straight as:

      categories
      and after finish of main categories .

      sub ategories start.

      i am using the query as;

      select cid, title, parentid
      from grcat
      order by cid

      <cfselect name="category" label="Select Category: " value="cid" display="title" query="getCats" tabindex="1" tooltip="Chooose Your category"></cfselect>

      i want is my subcategories should show after their maincategory

      like:

      autos/car
      autos/files

      in the same single select.

      I trying it but no possible solution working me instead