I am playing around with Bubble for a couple of days now to realize an idea I have, but now I have a problem that someone hopefully can help me with.
For the project I connected an external MySQL database using the SQL Database Connector. Simple querys are going great, as long as I have all the information hardcoded into the query.
When I want to use parameters and give them a test value, the value is not correctly placed into the query.
Since I use MySQL, I use ? as placeholder for the parameters. So that shouldn’t be the problem.
I agree with above, but it does matter where in the query you put the placeholder, and syntax matters too. For example WHERE MYCOLUMN = '?' is wrong because the parameter binding doesn’t need the single quotes. Nor does the value being put in.
The SQL Connector sucks has limitations, consider ditching it in favour of the API Connector, and using a REST API to access the DB.
I wanted to know, if there is a known bug with the SQL Connector in combination with MySQL databases and using test values. Or if I do something wrong.
I attach a screenshot to make sure, I don’t make a mistake.
I think I will try a PostgresSQL DB next and when that is not working either, I will try the API Connector. But therefore I have to create an API for the DB first and that is quite a challenge.
This looks to me like a parsing issue with the space in the column name. Have to tell you, I’ve put the SQL Connector through the ringer with all sorts of queries and have always found a way to get it to do what I need. Would it be possible to rename your table to AdsKPIs and your column to AccountID? I bet if you did that and removed the quotes, it would work fine:
select * from AdsKPIs where AccountID = ? limit 200
thank you for your reply. Sadly I can not change the column names. I receive the data from an external source and for automation purposes I have to use the same wording.
I found a way I can work with it. I just have to take the values from some source on my page.