CodeIgniter Forums
Transactions do not work - Printable Version

+- CodeIgniter Forums (
+-- Forum: Using CodeIgniter (
+--- Forum: General Help (
+--- Thread: Transactions do not work (/thread-71111.html)

Transactions do not work - girub - 07-07-2018

hello everyone, someone will know me to say what am I wrong ...? transactions do not work or maybe something else ...
I expect that if there is an error in the insert the transaction does not even update ... instead update is always performed ...
what do you recommend?
I did a lot of tests trying also with manual transaction .. but nothing
thank you so much
and sorry for my english !!

I attach the relevant code

PHP Code:

           foreach ($libriInVisione as $value) {

               $value explode("|"$value);
               $idMagazzino $value[0];
               $quantita $value[1];

               $this->db->set('quantita''quantita - ' $quantitafalse);


               //$dataVisione = '23-5-2016 23:15:23';
               $dataVisione_formattata date("Y-m-d"strtotime($dataVisione));




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