Home >Backend Development >PHP Tutorial >The difference between two types of open things in php mysqli extension
I see there are two ways to implement things in the documentation, one is:
<code>$link->autocommit( FALSE );//关闭自动提交 $link->query( 'sql...' ); $link->query( 'sql...' ); ... $link->commit() </code>
One is:
<code>$link->begin_transaction();//显示声明开始事物 $link->query( 'sql...' ); $link->query( 'sql...' ); ... $link->commit();</code>
Are there any similarities or differences between these two implementation methods?