Welcome Guest, Not a member yet? Register   Sign In
writing to database is failing but why?
#1

(This post was last modified: 11-22-2022, 08:37 AM by richb201.)

I am trying to update a field called fourparttest in the business_component table.  I am not getting an error,but the new data (which should be 4) doesn;t seem to update the database which is mysql on RDS. 

       $data=NULL;
        $data = array(
            'fourparttest' => $iComplete  //this is an int
            );
        $this->db->where('campaign =', $this->session->userdata('campaign'));
        $this->db->where('email =', $this->session->userdata('userid'));
        $this->db->where('bus_comp =', $post_array->bus_comp);
        $this->db->where('taxyear =', $post_array->taxyear);
        $iRc=$this->db->update('business_components',$data);

I can't seem to create a log file either.
proof that an old dog can learn new tricks
Reply
#2

You can get the last query:
PHP Code:
$this->db->last_query(); 
Reply




Theme © iAndrew 2016 - Forum software by © MyBB