How to insert data in a mysql table with thunkable?

Hello dear thunkable community,

I am really strugling with this since several weeks : could you help me to understand how I can insert data in my mysql database with thunkable please?

I saw that I can use Web API, but all the examples I saw is to get information from a public API and display it in the app. But my need is in the other direction : I need to connect to a database, and insert data in a table. And I am sorry, I really didn’t find any clear information about it, maybe it is too obvious?

Could anyone can guide me how to do it please? My mysql database is working with a wordpress website.
Do I need to create a file for the connexion? where to put it? how to call it when wanting to insert data? …

Thanks a lot

1 Like

Chances are if you can’t find much info about something in these forums then it’s not because it’s too obvious but because it’s hard to do.

This topic is similar to what you’re asking but there’s no solution posted:

There’s no reason you couldn’t do this, and if you already have a website talking to the MySQL database, you’d just need to craft a POST with the WebAPI block it’s understand. Probably not a zero code option (unless someone has already done it), but if you’ve already got a database backed website and are comfortable hacking at it, it should be pretty doable.

I thought it too, until I saw this subject : How use Response with MySQL & Airtable?
The author knows how to do it, but someone asks how and his response is not clear for me :frowning:

Yes, I think it is something with a POST instruction.
But how to enter the name, and the credentials to the database in thunkable? I am not confortable in hacking :slight_smile:

The first step is to get the API configuration from the WordPress side such as this link

Once WordPress made the APIs available, you can use them as instructed.

I also found this really helpful

Thanks Muneer, I will take a look at that :slight_smile:

1 Like