Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

category & sub category

Participant ,
Dec 03, 2008 Dec 03, 2008
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
TOPICS
Advanced techniques
282
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Dec 03, 2008 Dec 03, 2008
LATEST
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources