serverside sql WHERE key

Hi dev,

When using the WHERE key as a table on serverside, only “=” is accepted. If i try “>” it fails.

I havent tried it clientside.

This can be quite the downside if you need to compare with a lot of values like for example:

where={status>0}

and status can be from 0 to 10

Hi,

That is noted toward the end of the docs. Lua tables don’t understand a ‘>’ so that would be very complicated to make work.

You can however use the string based version as outlined in the docs here.

So:

where = "`status` \> 0"

will do the trick.

You should make sure to use the back-ticks for valid SQL. That part is automated in the regular table version. Hope that helps.

-dev

Hi,

That is noted toward the end of the docs. Lua tables don’t understand a ‘>’ so that would be very complicated to make work.

You can however use the string based version as outlined in the docs here.

So:

where = "`status` \> 0"

will do the trick.

You should make sure to use the back-ticks for valid SQL. That part is automated in the regular table version. Hope that helps.

-dev