How to read data from SQL into Bubble database – Database


I have a basic understanding of Bubble’s array looping and I have SQL data connections to an external SQL database. I need to write a program to import SQL Order Lines into a Bubble Order Lines table. I just want to make sure I’m doing this correctly.

I can do a query to the Order Lines table and see all the lines for a specific order but what is the best way to read through those order lines (loop) and write them to bubble?

Do I have to do a SQL Order Lines Query and return an Array of unique Order Lines by line number, then loop through those order lines as an Array and call another SQL query to locate each specific line and write it to the Bubble Database? Seems crazy to have 2 SQL queries, one to get the array list of lines for the order and then another query to get each line separately but am I right in how I need to do this?

That’s a lot of requests when all the data is available in the first Order Lines Query. Just want to verify I am doing this correctly.



Source link

Leave a Comment