Error when using IN operator

Wappler 5.2.4, M1 Mac.

When doing a standard Database Query and using something like this

I get this error

code: "ER_PARSE_ERROR"
message: "select * from `staff_employee_mapping` where `staff_employee_mapping`.`sem_group_ids` in '16' - ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''16'' at line 1"
stack: "Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''16'' at line 1\n    at Query.Sequence._packetToError (/opt/node_app/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)\n    at Query.ErrorPacket (/opt/node_app/node_modules/mysql/lib/protocol/sequences/Query.js:79:18)\n    at Protocol._parsePacket (/opt/node_app/node_modules/mysql/lib/protocol/Protocol.js:291:23)\n    at Parser._parsePacket (/opt/node_app/node_modules/mysql/lib/protocol/Parser.js:433:10)\n    at Parser.write (/opt/node_app/node_modules/mysql/lib/protocol/Parser.js:43:10)\n    at Protocol.write (/opt/node_app/node_modules/mysql/lib/protocol/Protocol.js:38:16)\n    at Socket.<anonymous> (/opt/node_app/node_modules/mysql/lib/Connection.js:88:28)\n    at Socket.<anonymous> (/opt/node_app/node_modules/mysql/lib/Connection.js:526:10)\n    at Socket.emit (node:events:513:28)\n    at addChunk (node:internal/streams/readable:315:12)\n    --------------------\n    at Protocol._enqueue (/opt/node_app/node_modules/mysql/lib/protocol/Protocol.js:144:48)\n    at Connection.query (/opt/node_app/node_modules/mysql/lib/Connection.js:198:25)\n    at /opt/node_app/node_modules/knex/lib/dialects/mysql/index.js:132:18\n    at new Promise (<anonymous>)\n    at Client_MySQL._query (/opt/node_app/node_modules/knex/lib/dialects/mysql/index.js:126:12)\n    at executeQuery (/opt/node_app/node_modules/knex/lib/execution/internal/query-executioner.js:37:17)\n    at Client_MySQL.query (/opt/node_app/node_modules/knex/lib/client.js:144:12)\n    at Runner.query (/opt/node_app/node_modules/knex/lib/execution/runner.js:130:36)\n    at ensureConnectionCallback (/opt/node_app/node_modules/knex/lib/execution/internal/ensure-connection-callback.js:13:17)\n    at Runner.ensureConnection (/opt/node_app/node_modules/knex/lib/execution/runner.js:272:20)"
status: "500"

And the query does indeed look wrong, I think it should be

"select * from `staff_employee_mapping` where `staff_employee_mapping`.`sem_group_ids` in (16) 

When testing this in Navicat, I can confirm it does not work, until I add the () around the value.

If I click the Custom button of the bottom left corner, and make no modifications at all, it works perfectly.

Community Page
Last updated: