forum

Home / DeveloperSection / Forums / connection with sql command

connection with sql command

Anonymous User249309-Jul-2013
Hi Expert!

How do I execute a command as and when a new mysql connection is established from php?

$con=mysqli_connect("localhost","root","","gts");

In the above example, I need to pass set sql command :

sql_log_bin = 0

This will make sure that the commands executed by this connection will not be written to binary log. I have another "normal" connection that will work as usual and write all the commands to binary log.

In other words I need 2 connections to mysql one with disabled binary logging. I should be able to decide which one to use. How is it done in PHP?

Thanks in advance. 

Updated on 09-Jul-2013
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By