Home >Backend Development >PHP Tutorial >cakephp运用事务

cakephp运用事务

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 10:39:391214browse

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');
?

?

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