![]() |
Retrieving database records using only the View? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Retrieving database records using only the View? (/showthread.php?tid=30493) |
Retrieving database records using only the View? - El Forum - 05-17-2010 [eluser]invision[/eluser] Hi, I know it doesn't make much sense. But is there an easy way to retrieve data from the database and display it to the public, using only the View? Does it make sense to hard code this into a 'View' or perhaps create a module and call it? There's a particular page on my site I want to list results from a table in the database. I would do it the normal MVC way, but I think it's pretty tricky with my current setup. I was going to use something like this: Code: if ($id == 4) { Thank you Retrieving database records using only the View? - El Forum - 05-17-2010 [eluser]invision[/eluser] I hate to bump, but really wouldn't mind some thoughts on this. Is it possible to retrieve data and display it solely in the View? It would just be for one page of the site. Thanks for any help. Retrieving database records using only the View? - El Forum - 05-17-2010 [eluser]Bart v B[/eluser] I don't understand the problem sorry. :red: But why would it only be in the view? i should do it with a model and controller. As what is see now is that if the uri_segement is 4 the it should do something. So what is the problem? It can be done in a normal MVC way i think. Maybe some more information would be nice. Retrieving database records using only the View? - El Forum - 05-18-2010 [eluser]invision[/eluser] Aaah. My apologies. I've actually found a workaround for this problem. Should've thought about it more than post. Thanks for your post. |