CodeIgniter Forums

Full Version: DRY database stuff
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]the_unforgiven[/eluser]
Hi all,

What is the best way to CRUD into different tables into the database without having to keep repeating myself?

I have seen some database libs kicking about but not sure how they work, can some explain this and what is the best way to achieve this?

El Forum

[eluser]solid9[/eluser]
Learn MY_Model.

http://codeigniter.tv/


El Forum

[eluser]jmadsen[/eluser]
Joost's video tutorial is an excellent way to understand them: http://codeigniter.tv/

Jesse Terry has written a nice one: https://github.com/jesseterry/CodeIgniter-CRUD-Model

Jamie Rumbelow has as well: https://github.com/jamierumbelow/codeigniter-base-model that I wrote a brief tutorial about how to use: http://www.codebyjeff.com/blog/2012/01/u...s-my_model

Definitely choose one or build your own and always be in the habit of using it - I wish a basic default MY_Model was included in CI & taught as the standard way to start coding projects