SQL Database Connector - error when initializing query

Hey Bubblers,

I’m playing around with the SQL Database Connector, but I can’t seem to make it work. I searched the forum and I found this post.

I think the creator of this post had the same problem I’m facing now. I connected to my database. So far, so good. I created my query:

When I hit Initialize this query the following error popup shows up:
image

I was following the instructions on this post:

I’m not getting the yellow marked part in the first example, so I used second example, although I’m not working with PostgreSQL.

Has anybody an idea what I’m doing wrong? I would also appreciate any easy tutorials or examples regarding the database connector. So far I haven’t found any that are helpful for beginners… :confused:

Thanks :v:

I solved it.

So maybe this is helpful for other bubblers that are just starting out like me.

The ? is the placeholder for the parameter. So the correct call is:
SELECT * FROM Customers WHERE idx = ? LIMIT 1;

with ? being the placeholder for the parameter $1.

If there would be more parameters, I would add more ? to the SQL Query. The ? are replaced in chronological order of the added parameters. So the first ? would be replaced by$1, the second ? would be replaced by $2 and so on.

It would be awesome if the documentation had a simple example like this in it. This would have saved me a lot of time.

I hope this will save someone else some time. Go on Bubblers :rocket::fire:!