About the Databases category

Discussion about several types of databases and how to integrate into Kodular

2 Likes

In makeroid one way to access external database is to use php script (to connect to the database, select records, update and delete). These script should be on the server (localhost or some web server). Also on the server should be the database.
1- php script to connect to the database.
2- script to select
3- script to delete
4-script for update
5-script to insert
6-database
The return of these php scripts will be in JSON format.
In Makeroid, we must use the WEB component to access the php scripts.
1-We direct the URL property of this WEB component to the path where the php script is located.
2-After, we call an HTTP POST request from the web component (passing parameters or not).
3-Finally, we use the When Gotext that indicates that the HTTP request has ended by returning the response code and the content content.
4- Inside a Gotext block Make a treatment to check the returned contents. This content will be in JSON format.
5-Save it in a empty list and go for each item in list by dropping the list using look up in pairs key and saving it to another empty list.
6-At the end, to show these records in the app, put this list in the Elements property of a ListView component.

Hi, I tried to do this but I returned it all in one element. How can I make a fraction of “response content” element by element?

Hello, sorry for the delay. I am still without a smartphone and so I have not done programming in kodular. in What I do is a SELECT SQL in php and return (within PHP code) in JSON FORMAT. If you only want one part, do it in SELECT. Look at the syntax of the SELECT SQL command.