0

show Call to a member function num_rows() on boolean when I going to join with two different database on production. on localhost working fine

my code is below :

$this->db->select('livedb.ADMIN_TEAM.id'); $this->db->from('livedb.ADMIN_TEAM');

          $this->db->join("olap.SL_DEMO_ACTIVITY_COUNT","(olap.SL_DEMO_ACTIVITY_COUNT.admin_id = livedb.ADMIN_TEAM.id) AND (olap.SL_DEMO_ACTIVITY_COUNT.assign_date='".$preData."')" ,"LEFT");
          $this->db->join("olap.SL_DEMO_ACTIVITY_COUNT","(olap.SL_DEMO_ACTIVITY_COUNT.admin_id = newforce_livedb.ADMIN_TEAM.id)" ,"LEFT");
          
          $this->db->where('livedb.ADMIN_TEAM.team_status','1');
          $this->db->where('livedb.ADMIN_TEAM.team_type','sales');
          $this->db->where('livedb.ADMIN_TEAM.id !=','129');
          $this->db->where('livedb.ADMIN_TEAM.sale_type','CRM');
          $this->db->limit('1');
          $this->db->order_by('livedb.ADMIN_TEAM.id','ASC');
          $query = $this->db->get();
          print_r($this->db->last_query());    

          if( $query->num_rows() > 0 ){
              return $query->result();
          }
          else {     return FALSE; }

0 Answers0