A shorter form for CF Code could be:
<cfif NOT listFindNoCase("string1,string2,string3,string4",1)>
blah
</cfif>

This says, "if 1 does not match any strings in the list"

If your strings could have commas, use a different delimiter -- like the |
here:
<cfif NOT listFindNoCase("string1|string2|string3|string4",1,"|")>

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Sunday, December 28, 2003 11:25 AM
To: CF-Talk
Subject: Fwd: Re[2]: OR NEQ cfif statement

Dave forget my last
email. The statement should be:
<cfif string1 NEQ 1 AND string2 NEQ 1 AND string3 NEQ 1 AND string4 NEQ
1>CheckErgebnis = ' '</cfif>

It works now.

Uwe

This is a forwarded message
From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
To: Dave Watts <[EMAIL PROTECTED]>
Date: Sunday, December 28, 2003, 7:38:38 PM
Subject: OR NEQ cfif statement

===8<==============Original message text===============
Dave, I get the following error by trying:
<cfif string1 NEQ 1 OR string2 NEQ 1 OR string3 NEQ 1 OR string4 NEQ
1>CheckErgebnis = ''</cfif>

It means: missing operator in _expression_ ''Failure' CheckErgebnis = '''.

Any ideas ?

Uwe

ODBC Error Code = 37000 (Syntax error or access violation)

[Microsoft][ODBC Microsoft Access Driver] Syntaxfehler (fehlender Operator)
in Abfrageausdruck ''Failure' CheckErgebnis = '''.

The error occurred while processing an element with a general identifier of
(CFQUERY), occupying document position (26:3) to (26:68).

Date/Time: 12/28/03 19:39:46
Browser: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR
1.1.4322)

>> The statement <cfif (string1 OR string2 OR string3 OR
>> string4) NEQ 1>CheckErgebnis = ''</cfif>
>> is causing some problems (sometimes) because from time
>> to time I get a syntax error in the update-statement.

DW> That's not valid syntax in CF. When building a compound Boolean
condition
DW> with the logical operators AND or OR, you must have a complete Boolean
DW> condition before and after your logical operator:

DW> <cfif string1 NEQ 1 OR string2 NEQ 1 ...

DW> Dave Watts, CTO, Fig Leaf Software
DW> http://www.figleaf.com/
DW> phone: 202-797-5496
DW> fax: 202-797-5444

DW>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to