Retrieving datas from database and displaying it in view - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Retrieving datas from database and displaying it in view (/showthread.php?tid=55578) |
Retrieving datas from database and displaying it in view - El Forum - 11-01-2012 [eluser]kasirajan PHP[/eluser] Hi, i need ur idea to retrieve datas from database and display the same in view while loading itself. I had created one model and written query in that and i had called that model from controller index function, so that it ll display in view while loading. but i dono how to display it in view after retrieving it from model. . Pls help.. Thanks in advance... Retrieving datas from database and displaying it in view - El Forum - 11-02-2012 [eluser]TWP Marketing[/eluser] [EDIT] Apologies, I misread your question, you do have database access and do want to use a model... I need more coffee. I've changed this reply to access a db table from the model In the controller: Code: ... In the model file mymodel.php Code: ... In a view file myview.php: Code: ... This is VERY basic code and you will find it all in the User Guide... Retrieving datas from database and displaying it in view - El Forum - 11-04-2012 [eluser]kasirajan PHP[/eluser] ok thank you. I had retrieved datas from database and displayed it in my page. It's working well and now i got another question for you. I need to do, insert,update,delete in same page. Pls help me with some sample codings. . . Awaiting your reply. Regards, Kasirajan.C |