![]() |
Issues with calling model from view - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html) +--- Thread: Issues with calling model from view (/thread-52702.html) |
Issues with calling model from view - El Forum - 06-22-2012 [eluser]Ghetolobster[/eluser] Morning all, I have a small (could be major) issue with once of my pages. Basically I want to load a list of views based upon a search made by the user. And for each for the rooms in the list I want to pull an image from a corresponding table. Now the issue arises when I try to call for the room's image. The first image will display but the rest wont, I get the error: Code: A PHP Error was encountered Severity: Notice This is what I have done so far My Model: Code: function get_room_image($rid) My Controller: Code: function search() My View: Code: ... Line 27 is actually the line with the img tag on it When I do a var_dump I get the following: Code: array(1) { SO it seems that it isn't performing the get_room_image function on each iteration correctly How would I go about resolving this matter? Any advice is most welcome. Regards, Issues with calling model from view - El Forum - 06-22-2012 [eluser]Ghetolobster[/eluser] Issue was resolved as I forgot to add a ";" onto a line within my db query string |