Categories > TinyButStrong general >

+- operator not working

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: JC
Date: 2009-07-28
Time: 19:17

+- operator not working

i have the following in one of the Joomla Article content. why the +- not working? results still show the whole list

{tbs}mergeblock=u;db=testdb;sql=SELECT grp, count(id) as ucount FROM testtbl WHERE amt +- 0.0 GROUP BY grp ORDER BY grp{/tbs}

Thanks!
By: Skrol29
Date: 2009-07-28
Time: 21:20

Re: +- operator not working

Hi JC,

"+-" is the operator for "if/when" TBS parameters only.
In your case you need the SQL operator ">" in order to define a valid SQL statement.
By: Skrol29
Date: 2009-07-28
Time: 21:24

Re: +- operator not working

Since ">" can make troubles in the HTML representation, you can define the SQL criteria differently:
SIGN(amt)=1
By: JC
Date: 2009-07-28
Time: 22:13

Re: +- operator not working

Thanks so much.

any suggestion to fix the following?

(tbs}mergeblock=u;db=testdb;sql=SELECT grp, count(id) as ucount FROM testtbl WHERE amt +- 20 GROUP BY grp ORDER BY grp{/tbs}
By: Skrol29
Date: 2009-07-29
Time: 01:44

Re: +- operator not working

SIGN(amt-20)=1