Welcome Guest, Not a member yet? Register   Sign In
CI's mysql transction question
#1

[eluser]chmod[/eluser]
<?
...

$this->db->trans_start();
//扣除游票
$result_sub_payment = $this->payforgame_model->sub_payment($username,$payment);
//写消息到临时表中:payforgame_tmp
$privatekey = 'ZrySfXys2008@Test';
$base64_username = base64_encode($username);
//md5加密串, accName(base64编码后)+creditNum+orderId+约定码
$digit = md5($base64_username.$point.$orderId.$privatekey);
$result_payforgame_tmp = $this->payforgame_model->payforgame_tmp($username,$gameid,$areaid,$payment,$orderId,$digit);
//事务处理结束
$this->db->trans_complete();

...
?>


I use CI's transaction as above.

because the SQL query in my model,so I am not sure the transction will be run?


Messages In This Thread
CI's mysql transction question - by El Forum - 06-12-2008, 07:45 AM
CI's mysql transction question - by El Forum - 06-12-2008, 09:47 AM
CI's mysql transction question - by El Forum - 06-13-2008, 03:25 AM



Theme © iAndrew 2016 - Forum software by © MyBB