Write to two or more MySQL tables

0

Doing this with two or more separate inserts in the same function is simple, but is there any more correct way to consume the least amount of resources? In the platform that we are working on, all user actions will be saved in other tables and later generated statistics.

    
asked by anonymous 17.09.2015 / 18:57

1 answer

0

I do not know which language you are accustomed to working with, but you could record each of the events in a session (SESSIONS) by storing the id of the event executor, and set a save time to save the event packet through a crontab script crontab . How could I also create a procedure (routine) that runs a script in MySQL.

To create a procedure and run an event script, check below:

  • Schedule MySQL Events
  • Create routines in MySQL li>
  • 17.09.2015 / 19:22