Hello, I am doing an API call to get multiple items and then formatting as text in a format that is MySQL friendly:
("(638) 833-5496","enim.curabitur@hotmail.couk","Spain"),
("(293) 742-0229","odio.semper@yahoo.net","Belgium"),
("1-265-156-4304","tincidunt.dui.augue@outlook.net","Ireland"),
("1-833-780-2553","scelerisque.scelerisque@aol.com","France"),
("(619) 691-0656","ac.risus.morbi@icloud.org","Costa Rica")
I have a MySQL database connected via the SQL Database Connector. I am having trouble inserting the string of text above into my external DB using the SQL Database Connector. Ideally, I would just run an insert statement on the fly such as
INSERT INTO `myTable` (`phone`,`email`,`country`)
VALUES
("(638) 833-5496","enim.curabitur@hotmail.couk","Spain"),
("(293) 742-0229","odio.semper@yahoo.net","Belgium"),
("1-265-156-4304","tincidunt.dui.augue@outlook.net","Ireland"),
("1-833-780-2553","scelerisque.scelerisque@aol.com","France"),
("(619) 691-0656","ac.risus.morbi@icloud.org","Costa Rica");
However, when I attempt to do this from the SQL Database Connector, I can’t figure out how to pass my full “values” statement as a parameter. I tried the below with declaring a parameter but it doesn’t like the syntax because it’s expecting “email” and “country” as well.
INSERT INTO `myTable` (`phone`,`email`,`country`)
VALUES
?
Any ideas? Is it possible to pass the insert statement a different way?
This will always be static
INSERT INTO `myTable` (`phone`,`email`,`country`)
VALUES
This will always be dynamic
("(638) 833-5496","enim.curabitur@hotmail.couk","Spain"),
("(293) 742-0229","odio.semper@yahoo.net","Belgium"),
("1-265-156-4304","tincidunt.dui.augue@outlook.net","Ireland"),
("1-833-780-2553","scelerisque.scelerisque@aol.com","France"),
("(619) 691-0656","ac.risus.morbi@icloud.org","Costa Rica");