Your syntax should read...
<CFIF request EQ "cat"> etc
N
on 9/9/01 4:11 PM, Jeffrey Cohen at [EMAIL PROTECTED] wrote:
> Help!!! Please!!!
> OK..I'm new at this, so be kind...
>
> I have a pulldown menu, that returns a URL like:
>
> marketplace.cfm?request=cat
> marketplace.cfm?request=twn or
> marketplace.cfm?request=alpha
>
> Then, in marketplace.cfm, I am trying to ORDER BY the variable above, like
>
>
> <CFQUERY NAME="GetResults" DATASOURCE="Reminder">
> SELECT * FROM customer
> <cfif request = cat>order by category</cfif>
> <cfif request = twn>order by town</cfif>
> <cfif request = alpha>order by busname</cfif>
> </CFQUERY>
>
>
> Of course, this blows up! (CAT is Undefined...), even though debugging tell
> me URL parameters request=cat. How am I supposed to pass a variable from a
> url to my sql query???
>
> Thanks in advance!
>
> Jeffrey
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists