Welcome Guest, Not a member yet? Register   Sign In
In view check if there is rows in the database
#1

[eluser]WebbHelp[/eluser]
Hi!

I am pretty new with codeIgniter and I just started a project.
My question is just about right or wrong.

In my view file:
If there is rows in the database THEN show a form, if not, don't show the form...
When I will see if there is rows in the database... Shall I do it right into the view file?
Or shall I first create a model-function which return the rows to the controller, and from the controller... yes what am I supposed to do?

I want to learn this in the correct way!

Can you please tell me what I am "Allowed" to write in the view file and what I should put in the controller class instead.

I understand that all view content will be in the view files, but what PHP am I allowed to write in the view file?

Thanks


Messages In This Thread
In view check if there is rows in the database - by El Forum - 05-05-2011, 03:29 PM
In view check if there is rows in the database - by El Forum - 05-05-2011, 04:14 PM
In view check if there is rows in the database - by El Forum - 05-05-2011, 04:17 PM
In view check if there is rows in the database - by El Forum - 05-05-2011, 05:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB