Welcome Guest, Not a member yet? Register   Sign In
query helper methods and transactions
#1

hi

the query helper methods insert_id and affected_rows return 0 after a transaction that contains a update and insert

i mention that the transaction is successful because it inserts the data without any problems

is this a bug or i'm missing something ?

my code is like this

PHP Code:
$this->db->trans_start();
$this->db->query('update query here');
$this->db->query('insert query here');
$this->db->trans_complete();

if (
$this->db->trans_status() !== FALSE)
{
    echo $this->db->insert_id();
 
   echo $this->db->affected_rows();

Reply


Messages In This Thread
query helper methods and transactions - by quasiperfect - 03-11-2015, 06:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB