2014-12-07 64 views
1

爲什麼存儲過程在一個事務中從未提交,當我執行的下一個功能的變化從來都反映:笨調用存儲過程到交易

function insertar ($pIdEmpresa) { 

    $this->db->trans_begin(); 

    $query = $this->db->query("CALL bdAltaDetFacturasLabsXSucursalAbonos($pIdEmpresa)"); 

    if ($this->db->trans_status() === FALSE) 
    { 
     $this->db->trans_rollback(); 
    } 
    else 
    { 
     $this->db->trans_commit(); 
    } 

    return $query->result(); 
} 

回答

0

可能

$query = $this->db->query("CALL bdAltaDetFacturasLabsXSucursalAbonos(?)", $pIdEmpresa);