Welcome Guest, Not a member yet? Register   Sign In
Need Help on CodeIgniter CRUD
#1

[eluser]StefanAlexandru[/eluser]
Hello, everyone, I am new to CI, and I have to say that is awesome!
Also the documentation is very good
Before asking my questions, i need to tell you all that my english is poor, and my OOP knowledge is basic!

These are my needs ->
-An administration zone for about 17 tables that have the same columns ( there are 17 countries that have same columns (id, environment,country,backbone,database,server), I want the user to enter into the administration and select in which table does he want to edit/add/delete! (of course i need an registration with login, but i think at this part i should handle)
I know how to make the script for each table, but i don't want to rewrite the code everytime!
I think i should make use of segment "trick", when somebody select a country, the url segment should change to that country, and my script take it as a $_GET
and chagnge the variable $tableName to the segment value!
The menu of the administration should have a link for each table!
I am not sure that I can do that, but I think is the only solution Smile !
I also thought that I could an datagrid, but of course i need some hints how to use them (flexgrid, jqgrid etc)


Give me some hints, or put me in the right direction on how to achieve this without writing so much code!
Thanks in advance and sorry for my bad english
#2

[eluser]Ben Edmunds[/eluser]
Hey Stefan,

I would suggest you go through some of the tutorials and video tutorials to get a good handle on the framework and start going piece by piece.


Check here:
http://codeigniter.com/wiki/Category:Help::Tutorials
#3

[eluser]StefanAlexandru[/eluser]
thanks for replying, I already done that, but i still don't know how to make the part with the tables! That is all that i need to know to start the project!
Thanks in advance!
#4

[eluser]Ben Edmunds[/eluser]
For simple CRUD you could just have the model take an argument with the table name.

Then have a controller call the model with the appropriate table. Make sure you consider security though, you don't want to pass sensitive information through the url.
#5

[eluser]web-johnny[/eluser]
If you don't want to begin from the scratch and create things that people already done , you can check grocery CRUD ( my signature link below ) and for security you can choose Ion Auth ( http://ellislab.com/forums/viewthread/145263/ )




Theme © iAndrew 2016 - Forum software by © MyBB