Jim,

I think this is happening in the second query that I am running. I was
having a problem with my menu system to where when there was no more data to
populate the menu it would dissapear. anyhow I added a second query to get
the last set of cat_id's viewed.


I have this set in my action page

<cfset temp = valueList(get_child_categories.cat_id)>
<cfset client.firstCat = listFirst(#temp#)>
<cfset client.LastCat = listLast(#temp#)>


And the query if the database has no more records to re-display the menu

<cfif get_child_categories.recordcount IS 0>
<cfquery datasource="#request.site.dsn#" name="get_child_categories">
SELECT
 categories.cat_id,
 categories.category,
 categories.parent_id
FROM
 categories
WHERE
 categories.cat_id
BETWEEN
 <cfqueryparam cfsqltype="cf_sql_integer" value="#Trim(client.firstCat)#">
AND
 <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(client.LastCat)#">
 ORDER BY CASE WHEN
 categories.category = 'other'
 THEN 1 ELSE 0 END,
 categories.category
</cfquery>
</cfif>


----- Original Message ----- 
From: "Doug Brown" <[EMAIL PROTECTED]>
To: "CF-Talk" <[email protected]>
Sent: Thursday, September 28, 2006 7:09 AM
Subject: Re: Arghhhh!!


> Jim,
>
> Here is the code that I am outputting with.
>
>    <cfoutput query="get_child_categories">
>                 <tr>
>                   <td bgcolor="##D2D2D2" "width=22" "height=19"
> align="center"><img src=_images/m07.gif></td>
>                   <td width="94%" bgcolor="##E9E9E9">
>                    <a
> href="#cgi.script_name#/fuseaction/sub_cats/cat_id/#cat_id#"
> class="black11">
> <cfif url.cat_id EQ #cat_id#><font
> color="black"><b>#trim(category)#</b></font>
> <cfelse>#trim(category)#
> </cfif></a></td></tr>
>    </cfoutput>
>
>
> Like I said, the weird thing is that no other make does this. I figured it
> is a database problem with mySql but once I moved it over to MSSQL it
still
> does the very same thing.
>
>
>
> ----- Original Message ----- 
> From: "Jim Wright" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[email protected]>
> Sent: Thursday, September 28, 2006 6:58 AM
> Subject: Re: Arghhhh!!
>
>
> > Doug Brown wrote:
> > > Ok, I found the culprit, but still do not understand why it only
happens
> > > with one certain make.
> > >
> > > ORDER BY CASE WHEN
> > >  categories.category = 'Other'
> > >  THEN 1 ELSE 0 END,
> > >  categories.category
> > >
> >
> > Doug,
> > What results do you get back if you run this query directly on the
> > database?  That CASE statement in the order by shouldn't be eliminating
> > any data, so I'm thinking this is probably something in how you are
> > outputting the menu in CF.  Can we see that code?
> > -jim
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:254601
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to