You mean like this:
cfquery name=qCart
datasource=dsMain
dbtype=ODBC
SELECT ItemName, BrandName, RetailEach, RetailUnit, UnitSize,
DetailedDescription, ItemNumber, MainCategory,
SubCategory1, SubCategory2
FROM MasterItemTable
WHERE 0=0
cfif
cfquery name=qCart
datasource=dsMain
dbtype=ODBC
SELECT ItemName, BrandName, RetailEach, RetailUnit, UnitSize,
DetailedDescription, ItemNumber, MainCategory,
SubCategory1, SubCategory2
FROM MasterItemTable
WHERE 0 = 0
cfif
try changing your isdefined(#SubCategory1#) to isdefined(SubCategory1)
also, it looks like you're going to get an error anyway - if the elseif part
of your block gets run, you'll have a sql statement which reads something
like:
SELECT ...
FROM ...
OR ...
which will throw an error.
I was to quick in replying:
IsDefined(Category1) ... IsDefined(Category2)
-Original Message-
From: Pascal Peters
Sent: maandag 17 december 2001 16:29
To: CF-Talk
Subject: RE: BrainFART: CFQuery conditional excecution
cfquery name=qCart
datasource=dsMain
dbtype=ODBC
Yep, That't the one, knew it was something simple!
Thanks..
- Original Message -
From: Steve Martin [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Monday, December 17, 2001 10:26 AM
Subject: RE: BrainFART: CFQuery conditional excecution
You mean like this:
cfquery name=qCart
5 matches
Mail list logo