Hello, I'm using the MySQL database and I have an event that runs daily at 1 hour. Within this event I check the date present in a row and compare with the current date, if the current date is smaller then I make the necessary operations. The problem is that I need to send an email indicating that this operation has occurred. Is it possible to call a PHP function to perform this work from the MySQL event?
function daily_situation_update()
{
global $wpdb;
$mapping = get_option('socialdb_general_mapping_collection');
$collection_id = $mapping['Emprestimo'];
$event = "CREATE
EVENT IF NOT EXISTS
e_daily_situation_update
ON SCHEDULE
EVERY 1 DAY_HOUR
COMMENT 'Altera o Status dos livros'
DO
BEGIN
SET SQL_SAFE_UPDATES = 0;
UPDATE
$wpdb->term_relationships
SET
term_taxonomy_id = ...