Push notifications on android with mysql, php and firebase

0

I have two tables A and B in MySQL. When a new record is inserted in A, a trigger inserts another one in B. What would be the correct way of doing that when creating that record in B I can execute a query that allows me to send the notification through firebase with php? through another trigger?.

The code to send the message by firebase is not the important thing.

    
asked by Mati Altamirano 15.11.2016 в 16:01
source

1 answer

0

Well, add a column called FLAGENVIO to your table B (0 = not sent, 1 = sent), create a scheduled task or a daemon that verifies that table from time to time and whenever you find that the FLAGENVIO is equal to zero , send a notification with the data of that record and update the FLAGENVIO to 1

    
answered by 28.11.2016 в 00:59