This is a multi-part message in MIME format.
------=_NextPart_000_0010_01C05ACF.7A7A4F20
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
CFlocking large if statements?
=20
How would you go about this if the "if" statement requires a "readonly" =
and within the if statement requires several "exclusives"? Please have a =
look at the code below. Any help or suggestions are appreciated.
<cfif IsDefined("session.variable1")>
**** bunch of code ****
<cfset session.variable2 =3D a>
**** bunch of code ****
<cfquery name=3D"query name" datasource=3D"#ds#">
SELECT column
FROM table
WHERE columnID =3D #session.variable3#
</cfquery>
**** bunch of code ****
<cfset session.variable4 =3D b>
**** bunch of code ****
<cfset session.variable5 =3D c>
**** bunch of code ****
</cfif>
This if statement and its contents are about 50 lines of code.
Thanks,
Kenny
------=_NextPart_000_0010_01C05ACF.7A7A4F20
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>CFlocking large if =
statements?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>How would you go about this if the "if" =
statement=20
requires a "readonly" and within the if statement requires several =
"exclusives"?=20
Please have a look at the code below. Any help or suggestions are=20
appreciated.</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2><cfif=20
IsDefined("session.variable1")></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> =
**** bunch of=20
code ****</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> <cfset =
session.variable2 =3D=20
a></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> =
**** bunch of=20
code ****</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> <cfquery =
name=3D"query name"=20
datasource=3D"#ds#"></FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =
SELECT=20
column</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =
FROM=20
table</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =
WHERE=20
columnID =3D #session.variable3#</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =
</cfquery></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial =
size=3D2> ****=20
bunch of code ****</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> <cfset =
session.variable4 =3D=20
b></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> =
**** bunch of=20
code ****</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> <cfset =
session.variable5 =3D=20
c></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> =
**** bunch of=20
code ****</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2></cfif></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>This if statement and its contents are =
about 50=20
lines of code.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Kenny</FONT></DIV></BODY></HTML>
------=_NextPart_000_0010_01C05ACF.7A7A4F20--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists