The most essential and repetitive part of designing any dynamic site is the CRUD. You have one or more database tables; you need to be able to Create, Read, Update, and Delete entries on each of these. Later, you'll do clever things with the data, but until there is some user-friendly way to put it there and maintain it, your site isn't viable.
This involves writing CRUD functions and though conceptually quite easy, they are fairly complex and time-consuming. But CI will help us make them faster and more reusable. For this example we are going to take our sites
table and make some functions to read, insert, edit, and delete. This is a good way of summing up and using many of the lessons that we've learned in the previous chapters.
So we are writing code for:
A controller for our
sites
table, with some functions to read, insert, edit, deleteSome views to present the data
A model to work with the data
We will also take a look at pagination and ordering...