Page 1 of 1

using AND plus OR together

Posted: Tue Oct 19, 2004 8:02 pm
by kevin5758
I've looked and thought, but just can't figure this out. How do I do this simple if statement, using AND and OR together? Below is approximately what I am trying to do.

Can some kind soul supply the simplest way to do this?

if (( $userAccess < $recordAccess ) AND

( $recordType <> 'Type One' OR $recordType <> 'Type Two' )) {

}


Best regards,
Kevin

Posted: Tue Oct 19, 2004 8:19 pm
by kettle_drum
Use more brackets to seperate what you want evaluated:

Code: Select all

if(($useraccess<$recordaccess) AND (($recordtype<>'Type One') OR ($recordType<>'Type Two'))){
   //blah
}