Chapter 6. Working with Databases
In this chapter, we will cover:
- Configuring CodeIgniter for databases
- Connecting to multiple databases
- Active Record – Create (insert)
- Active Record – Read (select)
- Active Record – Update
- Active Record – Delete
- Looping through database results
- Counting the number of returned results with num_rows()
- Counting the number of returned results with count_all_results()
- Counting the number of returned results
- Query binding
- Finding the last insert ID
- Finding the number of affected rows
- Finding the last database query
- Using CodeIgniter database migrations
- Moving to the current version with current()
- Rolling back/stepping forward with version()
- Generating an XML from a database result
- Generating a CSV from a database result
Introduction
Pretty ...
Get CodeIgniter 2 Cookbook 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.