The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Question about condition
Hi,
I have a question, is it OR '' still count as an condition or PHP just cross out that OR ''? |
#2
|
||||
|
||||
I don't understand your question...
You can use "OR TRUE" or something similiar, but that would defeat the purpose of the if clause. You can also say if($var == ('foo' OR ''){ |
#3
|
||||
|
||||
I use ... OR iif($expression, $valuereturniftrue, $valuereturniffalse = '') then if my $expression is false then I will get OR '' right?
Is that iif function always use to condition an expression in a comparison like $var = iif(....) or we can use it as a single condition like iif($expression, then true, then false) ? |
#4
|
||||
|
||||
you can leave away the $valuereturniffalse
Are you trying to do this in a MYSQL query? |
#5
|
|||
|
|||
What is the exact condition you are trying to evaluate?
|
#6
|
||||
|
||||
In the hack that I made
PHP Code:
|
#7
|
|||
|
|||
That's too complex to even read. I suggest breaking some parts of it into functions (for example, password_matches_md5_hash()) and then ditching iif. An inline if is not pretty to begin with, and it is a mess to deal with inside a normal if.
|
#8
|
||||
|
||||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|