function makeAcquire($nUsers,$nAwards)
{
//更新数据库
$tranDb = new Model();
$tranDb->startTrans();
for($i = 0; $i < sizeof($nUsers); $i++)
{
//更新表Acquire
$flagAc = $tranDb->table('Acquire')->add($acquire);
//更新表Users
$where = array('u_id'=>$nUsers[$i]['u_id']);
$flagU = $tranDb->table('Users')->where($where)->setInc('u_man_count',1);
//更新表Award
$where = array('a_id'=>$nAwards[$i]['a_id']);
$flagA = $tranDb->table('Award')->where($where)->setDec('a_count',1);
}
if($flagAc && $flagU && $flagA)
{
$tranDb->commit();
}
else
{
$tranDb->rollback();
}
}