Hi Lisa,

I think I follow that ...

Sooo .. how about this using QofQ.  First set up a query on MS SQL or 
whatever you are using that combines the two tables:

SELECT dbo.catetogy.cat_id, dbo.subcategory.sub_catid
FROM dbo.Registered LEFT OUTER JOIN
    dbo.message ON
    dbo.category.cat_id = dbo.subcategory.cat_id

Add all the other fields you'll need on the select line for each table. 
Save this query as dircategory_query.

(You could of course do this in CF and then run the QofQ against this table, 
but running it from the database will be much faster and take the strain off 
CF.)

Then:

<CFQUERY NAME="catlist"  DATASOURCE="endless" username="endlessm" 
password="endless97">
SELECT cat_id, sub_catid (and any other fields you need)
from dircategory_query
where cat_id = '#url.cat_id#' and  subcat_id = '#url.sub_cat#'
order by cat_order, sub_catOrder
</cfquery>

You can then use this query to do a QofQ, ie:

<cfquery dbtype="query" name = "Qcatlist">
 select *
 from catlist
 where
and in here put the conditions to select which sub_cats you want to display 
from the cat list query knowing that they will all be relating to the cat_id 
before you even start.  I think this could take some load off the app. too.
 </cfquery>

I hope this makes sense, let me know how you go :-)

Jenny


----- Original Message ----- 
From: "Lisa Deemy" <[EMAIL PROTECTED]>
To: "CF-Newbie" <[email protected]>
Sent: Sunday, October 16, 2005 7:56 AM
Subject: Re: cfelse or cfelseif or neither


> Thanks Jenny,
> Unfortunatly that doesn't work.
> If you'd like to see what the code does now see 
> http://www.endlessmountains.org/directory.cfm and click on dining you'll 
> see the list
> The client wants some of the subcategorys to display when the category is 
> clicked. (fewer clicks for the user)
> If you go to http://www.endlessmountains.org/directory500.cfm?cat_id=103
> you'll see in the center portion there is an alphabetical list of all the 
> places to eat, no longer broken up into subcategorys.
>
> so you'll see that ALL the subcategory listings cant be on one page. The 
> client still wants the categorys just not all the subcategorys. (Like 
> under shopping wants them together all except Antiques; and in places to 
> stay still wants tem all seperate the way they are now.
>
> the url2.variable was just a way to differentiate between the 2. But I 
> tried it the other way too.
> Thanks,
> Lisa
>
>
>>Hi Lisa,
>>
>>Working through the logic, could this work?
>>
>><cfset mode = "directory">
>><cfif isdefined("url.catID") and url.catID is 103>
>><cfset mode = "category">
>><cfelseif isdefined("url.catID2") and url.catID is 100>
>><cfset mode = "subcategory">
>></cfif>
>>
>>I noticed you used the variable url2.variable and I'm not aware this is
>>valid, I've only used url.variable myself?
>>
>>Are you just assigning the one variable from the url ?
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:15:1457
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to