How about:

ID      ParentID        URL             Title
1       0               index.cfm       Vaporizers
2       1               index.cfm       Ambient
3       2               index.cfm       Natural
4       2               index.cfm       Forced

To get the data out you may need to do it recursively, or look into sql
trees and something called tree traversal.

I had these links saved for this but I remember reading a better article
somewhere, if I find it I'll mail it.

http://www.dbmsmag.com/9604d06.html
http://www.dbmsmag.com/9603d06.html
http://www.sitepoint.com/article/1105/3

Ade

-----Original Message-----
From: Dave Phipps [mailto:[EMAIL PROTECTED]
Sent: 21 November 2003 09:37
To: CFUG
Subject: [ cf-dev ] Drop down dhtml from query


Hi,

I have the following snippet from a dhtml dropdown system 
which I need to generate from a db query.  How do I go 
about implementing the sub menus in the db table to make 
it easy to generate the correct parent-child relationships 
to get the nested dropdowns?

The code needs to look like this:

dqm__subdesc1_0  = "Vaporizers"; 
dqm__url1_0 = "index.cfm"; 
dqm__icon_index1_0 = 0; 
dqm__2nd_icon_index1_0 = 0
// sub menu of Vaporizers
dqm__subdesc1_0_0  = "Ambient"; 
dqm__url1_0_0 = "index.cfm"; 
dqm__icon_index1_0_0 = 0; 
dqm__2nd_icon_index1_0_0 = 0
//sub menu of Ambient
dqm__subdesc1_0_0_0  = "Natural Draft"; 
dqm__url1_0_0_0 = "index.cfm"; 
dqm__icon_index1_0_0_0 = 0
dqm__subdesc1_0_0_1  = "Forced Draft"; 
dqm__url1_0_0_1 = "index.cfm"; 
dqm__icon_index1_0_0_1 = 0

Any help would be great.

Cheers

Dave

-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to