deathisonitsway Posted January 27, 2008 Share Posted January 27, 2008 hi,Im from join from turkey...I have question...what is mysqli_autocommit? I did not find its response. please, can you explain what is mysqli_autocommit? <?php $mysqli = new mysqli("localhost", "my_user", "my_password", "world"); if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } /* turn autocommit on */ $mysqli->autocommit(TRUE); if ($result = $mysqli->query("SELECT @@autocommit")) { $row = $result->fetch_row(); printf("Autocommit is %s\n", $row[0]); $result->free(); } /* close connection */ $mysqli->close(); ?> why this command autocommit 1 returned ? regards Quote Link to comment https://forums.phpfreaks.com/topic/88028-what-is-mysqli_autocommit/ Share on other sites More sharing options...
deathisonitsway Posted January 27, 2008 Author Share Posted January 27, 2008 help me? ??? Quote Link to comment https://forums.phpfreaks.com/topic/88028-what-is-mysqli_autocommit/#findComment-450465 Share on other sites More sharing options...
rajivgonsalves Posted January 28, 2008 Share Posted January 28, 2008 it say it turns on autocommit that means you do not have to commit explicitly Quote Link to comment https://forums.phpfreaks.com/topic/88028-what-is-mysqli_autocommit/#findComment-451149 Share on other sites More sharing options...
deathisonitsway Posted January 30, 2008 Author Share Posted January 30, 2008 thanks,my friend but I did not still understand it. please, can you tell me explicitly it may be for example. Quote Link to comment https://forums.phpfreaks.com/topic/88028-what-is-mysqli_autocommit/#findComment-453364 Share on other sites More sharing options...
rajivgonsalves Posted January 31, 2008 Share Posted January 31, 2008 If you have read on a transaction database it is nothing get affected unless you commit. so if you insert a row, delete a row, or update it, it does not actually take place until you commit with autocommit it make the transaction complete meaning that immediately after running the statement the database is affected Quote Link to comment https://forums.phpfreaks.com/topic/88028-what-is-mysqli_autocommit/#findComment-454149 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.