From 58c937533a8c09402c9aa20ea6f6a41a1b148c38 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Fri, 30 Nov 2007 18:29:46 +0000 Subject: added example of multiple orderby()s --- user_guide/database/active_record.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'user_guide/database') diff --git a/user_guide/database/active_record.html b/user_guide/database/active_record.html index b538a4bcb..80af07ca2 100644 --- a/user_guide/database/active_record.html +++ b/user_guide/database/active_record.html @@ -360,7 +360,13 @@ The second parameter lets you set the direction of the result. Options are $this->db->orderby('title desc, name asc');

// Produces: ORDER BY title DESC, name ASC - + +

Or multiple function calls can be made if you need multiple fields.

+ +$this->db->orderby("title", "desc");
+$this->db->orderby("name", "asc"); +

// Produces: ORDER BY title DESC, name ASC +

$this->db->limit();

-- cgit v1.2.3-24-g4f1b