Wappler Version :5.0
Operating System :Windows
Server Model: NodeJS Local web server
Database Type:MariaDB 10.3.34
Hosting Type:
Expected behavior
What do you think should happen?
execute the SQL statement without adding the single colons (’) on LIMIT as they cause an error because they are not a literal.
Actual behavior
when execute custom query with LIMIT and OFFSET Wappler adds a single colon in parameter. It provoques a SQL error.
example:
SELECT * FROM users LIMIT :P1
or
SELECT * FROM users LIMIT :P1 OFFSET :P2
This adds single colons ’ arount the values of :P1 and :P2, which causes a SQL error when hiting th run button. sample:
SELECT * FROM users LIMIT ‘10’ OFFSET ‘2’
How to reproduce
1.- Create a custom query with Limit or Offset.
2.- include LIMIT with parameter :P1
3.- hit de run button
if LIMIT is hardcoded it works OK.
Bug reported previously here
Last updated: