Home >Backend Development >PHP Tutorial >The difference between two types of open things in php mysqli extension

The difference between two types of open things in php mysqli extension

WBOY
WBOYOriginal
2016-09-26 08:27:141036browse

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?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn