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
using AND plus OR together
Moderator: General Moderators
-
kettle_drum
- DevNet Resident
- Posts: 1150
- Joined: Sun Jul 20, 2003 9:25 pm
- Location: West Yorkshire, England
Use more brackets to seperate what you want evaluated:
Code: Select all
if(($useraccess<$recordaccess) AND (($recordtype<>'Type One') OR ($recordType<>'Type Two'))){
//blah
}