When i insert data to mysql and want get his new id ( and be sure to other user not add new other record and i get wrong number). I wanted use for this mysql transaction like below, who work in my mysql database
SQL Database Connector issue: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO lightlog_gmp.Przeplywy
(Id, CzekaNaReakcje, DataWniosku, Uwagi, ’ at line 2
Do you have any idea for other solutions for this problem?
Are you sure that’s correct syntax for MySQL? Also, I’m pretty sure you can only do one transaction, but you have multiple. Try a single one and see what happens.
So here is one of my smallest queries, but it shows you how to use the variables. First, I don’t see you using the variables. Secondly it’s telling you that it doesn’t like the second line (probably) because you have the ; which ends your query. It might not have been built for something like this, I am not sure?
As a alternate way of doing what you want, create another column in your database and insert a unique value for each transaction, then in a second transaction…
which is not existed when I use sign ? - i don’t know why, but first ‘?’ is recognise as first parameter, second ‘?’ is second parameter- i checked that only at mysql. Maybe this is only except only for mysql…
thanks a lot , so are you using mysql as your database? How you convert tinyint (boolean at mysql) to bubble yes/no? I try a few times, and every time bubble cannot understand change 1 to yes and 0 to no
I’m not entirely sure, but I don’t think the SQL Connector supports a block of statements. I think it might only work for one select, insert, update, etc. at a time. One idea is to convert your code into a MySQL Stored Procedure and then call the Stored Procedure from Bubble passing it the input parameters. I call MySQL Stored Procedures from my app and I know it works. Also, if you want the LAST_INSERT_ID to be available in your Bubble app you’d need to put that in a separate SQL Connector query and call it in the next workflow activity.
Also, confirming you use “?” for MySQL input parameters.