Message: Undefined property: Teilnehmer::$BookingData - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Message: Undefined property: Teilnehmer::$BookingData (/showthread.php?tid=11095) |
Message: Undefined property: Teilnehmer::$BookingData - El Forum - 08-25-2008 [eluser]Benedikt[/eluser] Hi, Im getting this Error: Quote:Message: Undefined property: Teilnehmer::$BookingData In the line where the error is noticed it says: Code: $CI = &get;_instance(); 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) 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? Message: Undefined property: Teilnehmer::$BookingData - El Forum - 08-26-2008 [eluser]lukeinjax[/eluser] I don't think this is the cause of your problem, but you have a double semi-colon on the return statement in get_data. Try removing it and see if it works. Message: Undefined property: Teilnehmer::$BookingData - El Forum - 08-26-2008 [eluser]lukeinjax[/eluser] Actually, I think it might have something to do with your naming convention (upper/lower case) of your BookingData model class and how you are referencing it. See 'Loading a Model' on this page: http://ellislab.com/codeigniter/user-guide/general/models.html. Message: Undefined property: Teilnehmer::$BookingData - El Forum - 08-26-2008 [eluser]mdowns[/eluser] try Code: $CI->load->model('bookingdata','BookingData'); Message: Undefined property: Teilnehmer::$BookingData - El Forum - 08-26-2008 [eluser]Benedikt[/eluser] Thanks guys, it was the upper/lower-case thing. I renamed $CI->... to the same spelling as $CI->load->... Now it works. |