Sending multiple http requests

Hi,
I have started an app that will use the Web component to send a http request to my online database insert rows and retrieve data using sql statements constructed within the app.
I used a tutorial example that includes a php script that sits on the server and handles the communication between app and my database. (I believe the php script method is used where the host for the database does not provide remote access directly) this is the case for my free hosting. Anyway, the point is that I have this working perfectly for a single table but I would like access 3 tables in the db, 2 for setup info (names etc) to populate the options in the app and 1 for the main data information. I can't just have 3 requests sent one after the other because it takes time for the webgot event to trigger and I get mixed results. I have thought about storing the parameter info and data info all on 1 table then I can have a single select statement and parse out the relevant info in another procedure but I really need to have the params and data separate for the structure to work. Other than this, I will implement a timer to pause between requests but I imagine that to be unreliable. (Not yet tried) my final idea is to duplicate what I already have to get 3 identical functions (each accessing different tables and dealing with the responses) but then I still have the problem of the next request overlapping the response and also that seems a bad way to use blocks making it busier than necessary. All of my ideas are frankly, naff in my opinion. Is there a better way to get data from different tables on a database to load in the app all in one function or at one time , e.g. screen initialize event.
I hope this is readable. Thanks in advance for any ideas.

Yes. (There is a better way)

Use the asynchronous nature of the web component. Send the first request, when you get the response, then send the second request, when you get the response, then send the third request.

You can achieve this in two ways:

  1. Use three web components
  2. Use one web component, but set a variable each time you call, testing and setting this after each response

Thanks for your response!
When i mentioned duplicate to get 3 identical functions I should have said - using 3 seperate web components, so I follow what you are saying in sugeestion no.1. I may do this and just accept that it's a lot of blocks and not very neat. I prefere your option 2 and i haven't yet tried to 'daisychain' the instructions like that but i do see what you mean there as well. I will have another go with this in mind.
I was thinking (hoping) that i'd missed a trick and there was a magic block that is used to assist in this scenario.
I will have a re think of my blocks, It's close just, needs the correct order i think.
Many Thanks.

If you go the multiple web component route, it would help you organize the components and logic to think about your app as a set of transactions, each transaction a sequence of web actions and responses. Include the transaction name (purpose) and step number in the web component names.

Thanks ABG . Seems like a solid way to go as you say it keeps things organized. So if i have 3 web components, each doing their own thing in their respective proceedures, can i call them at the same time in one event like a button.click (call proceedure 1,2,3) and they work independently?
I will try this next time i'm on it.
You have been helping me for years ABG . Couldn't have done many things without the forum.

Think very atomically, in fine grains. Remember the game Mousetrap, where you set up gadgets to trigger other gadgets until the last gadget drops a cage onto a plastic mouse, or how chains of dominoes can be lined up to fall in sequence.
But each domino or gadget is an event, no procedures needed.