It's possible to setup an automatic API POST when new row is created in Phpmyadmin?

Hi :smile:

I have a PHPMyAdmin running with MariaDB I would like to know if it’s possible to send a POST API from PHPMyAdmin to an external site (every time new row is added in a specific database including one cell of that row)

Not sure if it’s possible to do that directly in PHPMyAdmin with a PHP script or I have to set up something in Debian server where it’s running the PHPMyAdmin?

Any ideas?


Not using PHPMyAdmin, no.

Your best bet is to call the API from the application that is making the actual changes to the database.

1 Like

PHPMyAdmin is only a PHP script itself, you can change the source code.

1 Like

Thank you for answering!
I was wondering that way wouldn’t be an option to have real-time statistics

The idea is this:
I have two databases (One where is the PHPMyAdmin, which is used to store game information), and another one is the WebClient where users interact.

When a game is completed, all the game stats (kills, deaths, game score) is saved in the PHPMyAdmin side, but I want to display that data in another database. So my idea was to make a POST somehow with the PHPMyAdmin every time a new row is added (game ends) with the game id to my website.

This way, my website gets the “alert” that one game has been completed, and the web has the id to make a GET with all the data.

Otherwise, my website never will know that one game has completed cause some games take 10 minutes others up to 90… I want to have real-time statistics.

Any idea? Thank you

PHPMyAdmin doesn’t store the data itself, MySQL does. PHPMyAdmin is “just a website” that displays the data, it’s not a program that’s running all the time and it’s not keeping track of what’s happening in the database as long as you don’t refresh your browser.

If you want real time then what you should do is have the game write to MySQL AND some other mechanism that is able to real time send information to the website, like websockets or Server sent events.

Sending it MySQL and then using anything to keep of track of when MySQL changed is a world of hurt.

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