Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: $if and $and functions (Read 1812 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

$if and $and functions

Hey guys, how would i go doing something like this

$if(%ipod%$and(%bookmark%),1,THEN,ELSE)

I want this command to read both ipod and bookmark before doing the command, so if ipod is not set to 1 but bookark is set to 1 than this command will not work, but if ipod and bookmark is set to 1, the command will work.

Thanks

$if and $and functions

Reply #1
$if($and(%ipod%,%bookmark%),TRUE,FLASE)

No need to compare to "1" if the field is empty otherwise
In case it's not empty (i.e. has other values than "1") change appropriate syntax, with $strcmp() in $and() part