cakephp运用事务

WBOY
Release: 2016-06-13 10:39:39
Original
1176 people have browsed it

cakephp使用事务

begin;

INSERT INTO `dev_dgc`.`user_datas` (`id`, `game_id`, `created`) VALUES (NULL,? '1', '2');

INSERT INTO `dev_dgc`.`user_datas` (`id`, `game_id`, `created`) VALUES (NULL,? '1', '2');

INSERT INTO `dev_dgc`.`user_datas` (`id`, `game_id`, `created`) VALUES (NULL,? '1', '2');

commit;

?

?

?

$this->query('begin');// 保存新增用户信息if(!$this->save($data)) {return false;}if(!$PlayerDevice->bindPlayerDevice($data)){return false;}$this->query('commit');
Copy after login
?

?

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