Welcome Guest, Not a member yet? Register   Sign In
getting property of non-object error
#1

(This post was last modified: 04-27-2019, 03:00 AM by richb201.)

Severity: Notice --> Trying to get property of non-object



Here is the code






 

PHP Code:
function company_update($row)
{
 
   $userid=$this->session->userdata('userid');

 
   $query=$this->db->get_where('campaigns2',array('id'=>$row));

 
   $campaign $row->company_division;

 
 //  $campaign = $row->company_division;
 
   $this->session->userdata('campaign')-> $campaign;   << line with error
    $this
->db->set('campaign'$campaign);
 
   $this->db->where('email'$userid);
 
   $this->db->update('users'); 

This code seems to run fine on my windows apache and also on my AWS Lightsail server. Why would it be different on Ubuntu? I am thinking that I copied the campaigns2 table from the windows PC. Perhaps things got out of sync? Confused
proof that an old dog can learn new tricks
Reply


Messages In This Thread
getting property of non-object error - by richb201 - 04-27-2019, 02:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB