Welcome Guest, Not a member yet? Register   Sign In
Transaction on model function
#11

(This post was last modified: 12-28-2022, 05:33 AM by pippuccio76.)

(12-28-2022, 04:04 AM)kenjis Wrote: What's the problem?
Your code is difficult to understand. And I don't understand what the screenshot means.

Can you show more simple code to reproduce your issue?

i want simply update table's ,there is another exmple 

Code:
        $db = \Config\Database::connect();

        $db->transStart();

        $magazzino_model->delete($id);

        $tipo_prodotto_finito_model->where('id_magazzino',$id)->delete();
       


        $db->transComplete();
 

is this the correct way ?
Reply
#12

If the two models use the same db connection, the code is correct.
And if you don't specify another database group, models use the default group connection.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB