Categories > TinyButStrong general >

2 conditions

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Butch
Date: 2003-12-19
Time: 10:29

2 conditions

Hi, how can I use two conditions like this?

I want if var.user_data=4 and var.availible_credits=0 then show 'no'?

I use this:

[tbs_check; htmlconv=no; if [var.user_data]=4;then
   [tbs_check; htmlconv=no; if [var.availible_credits]=0;then 'no';]
;]

what is wrong ?
By: Skrol29
Date: 2003-12-23
Time: 00:13

Re: 2 conditions

Hello Butch,

You can not have two 'if' parameters in a TBS tag.
Only the last will be available.
To perform a 'and' condition, you can do something likde this :
[tbs_check;htmlconv=no;if '[var.user_data]+[var.availible_credits]'='4+0';then 'no']

The problem with you tags is that TBS don't supports embeded tags if they are sames types. (this will change)
By: Condutiarii
Date: 2003-12-23
Time: 22:47

Re: 2 conditions

Wow nice tips ! i didn't know we can do it !
By: webmonster
Date: 2004-05-19
Time: 12:01

Re: 2 conditions

Yes! That's really cool but, what about the 'or' condition?

I would like to do something like this:

if (var.user_data=4 or var.user_data=5 or var.user_data=6) then ...

Is there something in TBS for this?