diff options
author | Derek Jones <derek.jones@ellislab.com> | 2007-11-30 19:29:46 +0100 |
---|---|---|
committer | Derek Jones <derek.jones@ellislab.com> | 2007-11-30 19:29:46 +0100 |
commit | 58c937533a8c09402c9aa20ea6f6a41a1b148c38 (patch) | |
tree | 7ba6cf3af326be11925f6de008a1abea965ddf5a | |
parent | 1a274a0c5971086ed1690094790ad12858a73fd4 (diff) |
added example of multiple orderby()s
-rw-r--r-- | user_guide/database/active_record.html | 8 |
1 files changed, 7 insertions, 1 deletions
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 <kbd <code>$this->db->orderby('title desc, name asc');
<br /><br />// Produces: ORDER BY title DESC, name ASC
</code>
-
+
+<p>Or multiple function calls can be made if you need multiple fields.</p>
+
+<code>$this->db->orderby("title", "desc");<br />
+$this->db->orderby("name", "asc");
+<br /><br />// Produces: ORDER BY title DESC, name ASC
+</code>
<h2>$this->db->limit();</h2>
|