Welcome Guest, Not a member yet? Register   Sign In
Database Based Views
#7

(04-06-2015, 11:13 PM)gadelat Wrote: Yes, that should be enough for your needs, you shouldn't have complex logic in your views. Evaluating code from database is bad idea, but if you really want to do this, use eval()

Unfortunately, eval() would require that I find each and every PHP statement manually within the view. I just figured CI had this ability built in seeing as the load->view() does it. I don't want to have to use {} to make pseudo PHP. I'm not talking about complex statements, I'm very aware that complex statements should be kept out of the view and that's what I intend on keeping to. I'm talking about using real PHP to make some simple loop or conditional and/or echo statements. For my purposes, it's easier to read and understand than seeing a bunch of curly braces. Since I'm the only one who's going to be programming and designing these views, I really don't care if it's easier for non-programmers to learn the pseudo PHP.

I also don't want to use file based views, I'd prefer to use database based views. I'd just like to be able to pull my view from the database (which already works fine) then have CI evaluate the pulled view and display the page.
Reply


Messages In This Thread
Database Based Views - by mtylerb - 04-05-2015, 02:13 PM
RE: Database Based Views - by gadelat - 04-05-2015, 03:35 PM
RE: Database Based Views - by mtylerb - 04-05-2015, 03:45 PM
RE: Database Based Views - by gadelat - 04-05-2015, 11:58 PM
RE: Database Based Views - by mtylerb - 04-06-2015, 04:52 PM
RE: Database Based Views - by gadelat - 04-06-2015, 11:13 PM
RE: Database Based Views - by mtylerb - 04-07-2015, 05:47 PM
RE: Database Based Views - by gadelat - 04-08-2015, 12:06 AM
RE: Database Based Views - by mwhitney - 04-08-2015, 12:31 PM
RE: Database Based Views - by mtylerb - 04-08-2015, 04:38 PM



Theme © iAndrew 2016 - Forum software by © MyBB