summaryrefslogtreecommitdiffstats
path: root/user_guide/database
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2007-11-30 19:29:46 +0100
committerDerek Jones <derek.jones@ellislab.com>2007-11-30 19:29:46 +0100
commit58c937533a8c09402c9aa20ea6f6a41a1b148c38 (patch)
tree7ba6cf3af326be11925f6de008a1abea965ddf5a /user_guide/database
parent1a274a0c5971086ed1690094790ad12858a73fd4 (diff)
added example of multiple orderby()s
Diffstat (limited to 'user_guide/database')
-rw-r--r--user_guide/database/active_record.html8
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>