summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGábor Hojtsy2011-07-27 08:36:09 (GMT)
committer Gábor Hojtsy2011-07-27 08:36:09 (GMT)
commit75a3fd383b55dcb5677109eea9c938e71366e807 (patch)
treeca723af07c2aeddbc697cdd7707019ba090f2590
parent54567a779e5daa2643dfeb465cd887c8f6be2d2c (diff)
Issue #1149628 by Ben Coleman: fix blog module query to include all ORDER BY fields in select for PostgreSQL compatibility
-rw-r--r--modules/blog/blog.pages.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/blog/blog.pages.inc b/modules/blog/blog.pages.inc
index 3c468f9..e4c7074 100644
--- a/modules/blog/blog.pages.inc
+++ b/modules/blog/blog.pages.inc
@@ -63,7 +63,7 @@ function blog_page_last() {
$output = theme('item_list', $items);
- $result = pager_query(db_rewrite_sql("SELECT n.nid, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC"), variable_get('default_nodes_main', 10));
+ $result = pager_query(db_rewrite_sql("SELECT n.nid, n.sticky, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC"), variable_get('default_nodes_main', 10));
$has_posts = FALSE;
while ($node = db_fetch_object($result)) {