How to Multpile get querys through a single Web component?

Hi there,

I’m developping an app which uses multiple queries to get from a database. MySQL and PHP.

When the app starts I need to get multiple sets of data. A csv string for the menu, a csv string with materials, a csv string with tools etc.

Can I use 1 Web component to get the results from all queries? More specific: how to store the gathered information to each individual item?

Can you show few queries ther by we can suggest you accordingly.

Link to large format screenshot

At a time you will use one web and lust view, correct?

List view, correct. All 3 queries feed a list-picker, correct

On Initialise there’s 2 query running at the same time. Thats the biggest issue.

Do you want that both result…? On screen inti that two queries result ?

Yes, the 3 list are on he same screen at the same time.
To be very precise: First “category” is loaded. On selection a query is send in order to receive the elements for “tooling”
A third query is run only at “Initialise”, that fills the “material” list.

Can you share the url? So that it can be solved soon or aia (either here or in pm)

try like this then…

1 Like

I reviewd your code and the (deleted) suggestion.
I did try this solution before asking, but failed. With your help I got it up and running. Thnx.

1 Like

The deleted suggestion was the solution algorithm, It works.
I use it that way with my PHP Scripts.

That came to my mind as I reviewed your code and the other suggestion. I need to take a more php-like approach when it comes to logic, variables, globals, if-then statements etc.

Use your php scripts and the return will be handled in Kodular blocks. And that part of treating the Json return, you’ve already done it. So now, it’s creating your scripts (and consuming them as APIs) passing parameters (POST) or simply getting the return (GET)

Why POST to send and GET to retrieve? (What’s in a name…)
I could use POST to get a result from the server as well. Now I send values to the server by putting them in an url. What would be the advantage of using POST in this case?

There are differences :+1:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.