Welcome Guest, Not a member yet? Register   Sign In
Message: Undefined property: Teilnehmer::$BookingData
#1

[eluser]Benedikt[/eluser]
Hi,

Im getting this Error:

Quote:Message: Undefined property: Teilnehmer::$BookingData
Fatal error: Call to a member function get_data() on a non-object

In the line where the error is noticed it says:

Code:
$CI = &get;_instance();
  $CI->load->model('bookingdata');
  $CI->load->library('email');

  $data_row = $CI->BookingData->get_data($best_code);
  $club_row = $CI->BookingData->get_club($data_row->tbl_clubs_id);

Its inside a helper-function. The error raises in the last line, $club_row. In this line a model is called which gives back the result of a DB-query:

Code:
function get_data($best_code)
    {
      $query = $this->db->get_where('tbl_teilnehmer', array('best_code' => $best_code));
      $row   = $query->row();

      return $row;;
    }

Any idea what is wrong?

I mean, I see that its a problem to access an object which is not an object, but can I convert $data_row into an object? Or do I need to access it like an array?


Messages In This Thread
Message: Undefined property: Teilnehmer::$BookingData - by El Forum - 08-25-2008, 10:24 PM
Message: Undefined property: Teilnehmer::$BookingData - by El Forum - 08-26-2008, 10:32 AM
Message: Undefined property: Teilnehmer::$BookingData - by El Forum - 08-26-2008, 10:38 AM
Message: Undefined property: Teilnehmer::$BookingData - by El Forum - 08-26-2008, 11:04 AM
Message: Undefined property: Teilnehmer::$BookingData - by El Forum - 08-26-2008, 11:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB