From df2c03372906df166daccbbeb4cfd4540d798160 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 26 Feb 2004 17:55:14 +0000 Subject: - 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.) --- modules/node/node.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/node') 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(''); $output = ''; -- cgit v1.2.3