Home > Database > Mysql Tutorial > mysql-关于php中的try catch问题

mysql-关于php中的try catch问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 09:34:58
Original
1513 people have browsed it

mysqlphp

被 try catch 包住的代码块,是不是就像mysql事物一样,要么全运行,要么全失败?
如果不是,怎样在php中实现类似事物的功能?

现在遇到一个情况:有三张表的字段不同,但是每条数据的ID必须完全一致。
向一张表里插入,就必须也在其他表中也插入相应的数据,保证每个ID一致。
但是如果在PHP运行的途中,发生意外的情况导致三张表没有都插入数据,后面的就全都乱了。。。

Related labels:
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