Hi.
Currently, sql.em module provides the use of the MySQL database. However, it is always necessary to connect and in the end of the routine it closes the connection when we run the same script N times.
A suggestion would be to use the mysqli_connect () so that persistent connection and avoid establishing new connections.
Regards,
Skinny.
Persistent Connection MySQL
Re: Persistent Connection MySQL
You can create a script with infinite loop and events listner. Connect there to sql, wait for events and write events info into database whole time.
Re: Persistent Connection MySQL
This is also the recommended way of adding SQL support in your scripts. Since the SQL commands put the current script into sleep state until the SQL server responds. Depending where the SQL server is installed this can take several milliseconds even for simple get queries.
Re: Persistent Connection MySQL
I managed to create the script with the suggestions given by you. Thank you very much!