Message: Undefined property: Teilnehmer::$BookingData |
[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?
[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.
[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-gui...odels.html.
[eluser]mdowns[/eluser]
try Code: $CI->load->model('bookingdata','BookingData');
[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. |
Welcome Guest, Not a member yet? Register Sign In |