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

cakephp运用事务

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 13:14:58
Original
1131 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
Latest Issues
The created website cannot be opened
From 1970-01-01 08:00:00
0
0
0
How to use the created hook in the setup script
From 1970-01-01 08:00:00
0
0
0
javascript-vue component created
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template