run_sql parameters #1132
charlieglnp
started this conversation in
General
Replies: 1 comment
-
|
Yes, this is intentional. You can use sqlpage.variables and merge existing variables with new ones, but I wouldn't recommend it. For future-proofing your code and making it easier to maintain and debug, it's usually better to explicitly name the parameters you are passing to run_sql. Can you open a pull request with the changes you would like to see in the documentation to make it more explicit? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This has caught me out a few times - inclusion of parameters in the function call removes the ability to access the same variables as the calling page. Is this by design/as expected? The description of the function is slightly ambiguous and I initially interpreted it as passed parameters being additional to those available in the calling file.
E.g.
calling.sql
include.sqlBeta Was this translation helpful? Give feedback.
All reactions