Welcome Guest, Not a member yet? Register   Sign In
Editing Data in a Database
#1

[eluser]Unknown[/eluser]
Ok I'm a complete noob when it comes to CodeIgniter, as I have just finished the Blog tutorial on the site. I was just wondering how I could create a page that would allow me to edit/delete comments that are stored in the database.
#2

[eluser]Myles Wakeham[/eluser]
[quote author="Nukeyboy" date="1253543141"]Ok I'm a complete noob when it comes to CodeIgniter, as I have just finished the Blog tutorial on the site. I was just wondering how I could create a page that would allow me to edit/delete comments that are stored in the database.[/quote]

I'd suggest starting with understanding the Model/View/Controller design pattern. CI is built on that and is strict to it. That means that you separate your user interface from the database, and build a model that mimics your database access. Then your UI simply works with the Model to add/edit/delete/list, etc. against the database. Its kinda abstracted away from the raw database that way, but the ability to break things up into nice 'boxes' is key to being able to grow a system and control each class with its own unit tests, etc.

If MVC is something you don't want or need, then CI might be overkill for what you need it to do. But if you study how MVC works, and how to implement it, I think you'll find its a brilliant way to build systems, update databases, etc. Its just critical that you understand it first, before understanding how CI does things.

Myles




Theme © iAndrew 2016 - Forum software by © MyBB