Low code platform for building business apps and workflows in minutes. Supports PostgreSQL, MySQL, MariaDB, MSSQL, MongoDB, Rest API, Docker, K8s, and more 🚀
[ ] I have searched budibase discussions and github issues to check if my issue already exists
Hosting
Self
Method: digital ocean:
Budibase Version: 2.32.15
App Version: 2.32.15
Describe the bug
I am reading a MySQL view through a query and using a handlebar binding as one of the variables in the WHERE clause.
select * from bc_pkbatchBB where PkBatch = {{ varPkBatch }}
PkBatch has various entries including "10/1" and "10/2" etc. When I try and read this with varPkBatch set to 10/1 then I don't get any entries returned. If I set the value to 10 then I get both the entries with 10/1 and 10/2 returned. I suspected that it has something with escaping the characters and have used quotes inside the where clause moustache like {{ "varPkBatch" }} and various other options but to no avail. What I need the select to look like is as follows for it to work:
select * from bc_pkbatchBB where PkBatch = '10/1'
i.e. with the apostraphes around the variable to make it a text.
To Reproduce
Steps to reproduce the behavior:
Create a MySQL view which has entries in one of the fields that has forward slashes but is a text field.
Create a query in the Data section of the App querying this view similar to above.
Put the binding name: varPkBatch, Default 10/1.
See no entries returned
Expected behavior
I want the entry with 10/1 to be returned
Screenshots
Desktop (please complete the following information):
Checklist
Hosting
Describe the bug I am reading a MySQL view through a query and using a handlebar binding as one of the variables in the WHERE clause. select * from bc_pkbatchBB where PkBatch = {{ varPkBatch }} PkBatch has various entries including "10/1" and "10/2" etc. When I try and read this with varPkBatch set to 10/1 then I don't get any entries returned. If I set the value to 10 then I get both the entries with 10/1 and 10/2 returned. I suspected that it has something with escaping the characters and have used quotes inside the where clause moustache like {{ "varPkBatch" }} and various other options but to no avail. What I need the select to look like is as follows for it to work:
select * from bc_pkbatchBB where PkBatch = '10/1'
i.e. with the apostraphes around the variable to make it a text.
To Reproduce Steps to reproduce the behavior:
Expected behavior I want the entry with 10/1 to be returned
Screenshots
Desktop (please complete the following information):