From 74bb4e2c07f1fcbdce99f157a530973fefd73cdc Mon Sep 17 00:00:00 2001
From: Jennifer Hodgdon <yahgrp@poplarware.com>
Date: Thu, 27 Feb 2014 14:37:56 -0800
Subject: [PATCH] Issue #2194027 by KelvinWong, sphism, danblack: Fix example
 query in database topic docs

---
 core/includes/database.inc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/core/includes/database.inc b/core/includes/database.inc
index 5f085597ecca..0064ee46fa15 100644
--- a/core/includes/database.inc
+++ b/core/includes/database.inc
@@ -39,12 +39,14 @@
  * For example, one might wish to return a list of the most recent 10 rows
  * authored by a given user. Instead of directly issuing the SQL query
  * @code
- * SELECT e.id, e.title, e.created FROM example e WHERE e.uid = $uid LIMIT 0, 10;
+ * SELECT e.id, e.title, e.created FROM example e WHERE e.uid = $uid
+ *   ORDER BY e.created DESC LIMIT 0, 10;
  * @endcode
  * one would instead call the Drupal functions:
  * @code
  * $result = db_query_range('SELECT e.id, e.title, e.created
- *   FROM {example} e WHERE e.uid = :uid', 0, 10, array(':uid' => $uid));
+ *   FROM {example} e WHERE e.uid = :uid
+ *   ORDER BY e.created DESC', 0, 10, array(':uid' => $uid));
  * foreach ($result as $record) {
  *   // Perform operations on $record->title, etc. here.
  * }
-- 
GitLab