Chapter 13. CRUD—or Putting It All Together

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 ...

Get CodeIgniter 1.7 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.