O'Reilly logo

Programming with CodeIgniter MVC by Yehuda Zadik, Eli Orr

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Example 1 – a CRUD example

In this example, we will see how to use a CI model. For this example, we will use a model that performs these operations on the database: SELECT, INSERT, and UPDATE.

The example displays, all the products that are retrieved by the model productmodel at the main page in the database.

Let us assume the URI to the project root is http://mydomain.com/myproject and http://mydomain.com/myproject/product.

Note

The source code is provided with this book via URLs.

The main page has links for adding and editing a product. These links generate a form for editing and adding a product.

Let us assume the URI to the project root is http://mydomain.com/myproject and http://mydomain.com/myproject/product/add.

Suppose we want to edit and update ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required