Home : Products : DBMan : Customization :

Products: DBMan: Customization: Re: [Watts] Greater than - Less than "if" statement help: Edit Log

Here is the list of edits for this post
Re: [Watts] Greater than - Less than "if" statement help
Ok, it doesn't seem to be working like I want it to... here is the code that I am using:

if ((($per_admin) || ($per_mem)) && (($diff > 7) || ($diff < 30))) {
print qq| print something |;
}
elsif ($per_admin || $per_mem && $diff > 30) {
print qq| print something else |;
}
elsif ((($per_admin) || ($per_mem)) && (($diff > 0) || ($diff <= 7))) {
print qq| print something else|;
}
else {
print qq| print something else |;
}


The first if is all that is printing no matter what...

It works if I put it like this:

if ($per_admin || $per_mem && $diff < 30) {
print qq| print something|;
}
elsif ($per_admin || $per_mem && $diff > 30) {
print qq| print something else |;
}
else {
print qq| print something else |;
}

But I want to print something if it's greater than 7 and less than 30 not just less than 30.

Not sure what I doing wrong?

Last edited by:

donm: Nov 25, 2003, 1:13 PM

Edit Log: