Currently sqlpage functions are executed before the query is sent to the database, and their output is sent to the database.
To use a value from the database as input in a sqlpage function, one needs to define a variable:
set $x = (select x from y where id = 123);
select sqlpage.some_function($x);
Currently sqlpage functions are executed before the query is sent to the database, and their output is sent to the database. To use a value from the database as input in a sqlpage function, one needs to define a variable:
However, the following is not possible:
we should lift this limitation.
see https://github.com/lovasoa/SQLpage/discussions/328