Answer the question
In order to leave comments, you need to log in
MySQL+ execution of external commands on certain events, perhaps?
In short, there is a commercial PHP script in whose code you cannot interfere (zend), but you need to add a little functionality. So the idea arose to write a script (in python for example) that adds the necessary functionality and run it when the main script enters data into the database. Therefore, the question arose whether it is possible in mysql to hang up the execution of a command on insert / update in a specific table, ideally with the transfer of some values from the added data as parameters to the script?
Records will be added to the database with a specific description of the content in the fs folders and a link to these folders, while the script should create a specific report file based on the content of the folder and save it in the root of this folder.
Well, an additional question - how much would such a refinement cost?
Answer the question
In order to leave comments, you need to log in
as mentioned above, you can hang the tables you are interested in with triggers, collect the data necessary for the scripts with their help and fill in a separate table with them, a kind of “scheduler” for an external script that will pick up tasks by cron and generate the necessary reports. if the solution with the “scheduler” and cron is not suitable and “realtime” is required, dig towards the “external stored procedure” they are written here starting from the 3rd, emnip, version, and for more recent ones, you can try the appropriate plugin from here External Language Stored Procedures , with their help you can write in languages other than C (Java, Perl and something else), though it works mysteriously and if possible, it is better to write in the old fashioned way without any additional plugins.
There are "triggers", maybe this will suit you. Google “MySQL triggers”, there is a lot of information on this topic even in Russian.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question