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
Release: 2016-09-26 08:27:14
Original
1053 people have browsed it

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>
Copy after login

One is:

<code>$link->begin_transaction();//显示声明开始事物
$link->query( 'sql...' );
$link->query( 'sql...' );
...
$link->commit();</code>
Copy after login

Are there any similarities or differences between these two implementation methods?

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template