summaryrefslogtreecommitdiff
path: root/modules/node
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-02-26 17:55:14 +0000
committerDries Buytaert <dries@buytaert.net>2004-02-26 17:55:14 +0000
commitdf2c03372906df166daccbbeb4cfd4540d798160 (patch)
tree9638d38009aa2eb77a0aa562fb1aa732c06eb03a /modules/node
parentf54aab6a3eff4d917e1768f340b4774aec5bef61 (diff)
downloadbrdo-df2c03372906df166daccbbeb4cfd4540d798160.tar.gz
brdo-df2c03372906df166daccbbeb4cfd4540d798160.tar.bz2
- Patch 6066 by Adrian: PostgreSQL does not return 'affected rows' when doing
a select statement. Even though PEAR supports this functionality, it fails silently when using PostgreSQL. We use the db_num_rows() function instead to return the amount of rows returned. (According to Killes, the MySQL manual also states that it should not return affected rows on a 'select' statement.)
Diffstat (limited to 'modules/node')
-rw-r--r--modules/node/node.module2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index 7a15ef9ea..ed300212a 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -1491,7 +1491,7 @@ function node_delete($edit) {
function node_page_default() {
$result = pager_query('SELECT nid, type FROM {node} WHERE promote = 1 AND status = 1 ORDER BY static DESC, created DESC', variable_get('default_nodes_main', 10));
- if (db_affected_rows($result)) {
+ if (db_num_rows($result)) {
drupal_set_html_head('<link rel="alternate" type="application/rss+xml" title="RSS" href="'. url('node/feed') .'" />');
$output = '';