Dan;

Remove the first </cfif>

select *
from tbl
where <CFIF isDefined("id")>
        id = #id#
        <CFELSEIF isDefined("name")>
        name=#name#
        </cfif>

If I am reading your question right, this should work for you.

Larry Juncker
Senior Cold Fusion Programmer
Heartland Internet

-----Original Message-----
From: Dan Donnick [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 28, 2000 11:36 AM
To: CF-Talk
Subject: conditional where statement


is this correct or am i missing something?

select *
from tbl
where <cfif isdefined(")>
        id = #id#
        </cfif>
        or
        <cfif isdefined(")>
        name = #name#
        </cfif>
______________________________

Dan Donnick
Cold Fusion Developer
Bixler Incorporated
1250 24th Street
Suite 250
Washington, DC 20037
P: (202) 686-5800
F: (202) 686-5801
______________________________

----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.


------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to