From e334c472fb4be44feec3a73402fc4a2b062cbfc0 Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 21 Oct 2006 19:44:22 +0000 Subject: --- user_guide/database/active_record.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'user_guide/database/active_record.html') diff --git a/user_guide/database/active_record.html b/user_guide/database/active_record.html index f30b3d8b6..b5c94a2cd 100644 --- a/user_guide/database/active_record.html +++ b/user_guide/database/active_record.html @@ -12,7 +12,7 @@ @@ -66,9 +66,9 @@ Active Record

Active Record Class

-

Code Igniter uses a modified version of the Active Record Database Pattern. -This pattern allows information to be retrieved, inserted, and updated in your database with minimal scripting. -In some cases only one or two lines of code are necessary to perform a database action. +

Code Igniter uses a modified version of the Active Record Database Pattern. +This pattern allows information to be retrieved, inserted, and updated in your database with minimal scripting. +In some cases only one or two lines of code are necessary to perform a database action. Code Igniter does not require that each database table be its own class file. It instead provides a more simplified interface.

Beyond simplicity, a major benefit to using the Active Record features is that it allows you to create database independent applications, since the query syntax @@ -182,7 +182,7 @@ $query = $this->db->get();

Multiple function calls can be made if you need several joins in one query.

-

If you need something other than a natural JOIN you can specify it via the third parameter of the function. +

If you need something other than a natural JOIN you can specify it via the third parameter of the function. Options are: left, right, outer, inner, left outer, and right outer.

@@ -353,7 +353,7 @@ $this->db->orlike('body', $match);

$this->db->orderby();

-

Lets you set an ORDER BY clause. The first parameter contains the name of the column you would like to order by. +

Lets you set an ORDER BY clause. The first parameter contains the name of the column you would like to order by. The second parameter lets you set the direction of the result. Options are asc or desc or RAND()

$this->db->orderby("title", "desc"); @@ -563,7 +563,7 @@ $this->db->delete('mytable', array('id' => $id)); // DELETE FROM mytable
// WHERE id = $id
-

The first parameter is the table name, the second is the where clause. You can also use the where() or orwhere() functions instead of passing +

The first parameter is the table name, the second is the where clause. You can also use the where() or orwhere() functions instead of passing the data to the second parameter of the function: -- cgit v1.2.3-24-g4f1b