summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/aggregator/aggregator.admin.inc2
-rw-r--r--modules/simpletest/tests/database_test.test18
-rw-r--r--modules/taxonomy/taxonomy.admin.inc2
3 files changed, 11 insertions, 11 deletions
diff --git a/modules/aggregator/aggregator.admin.inc b/modules/aggregator/aggregator.admin.inc
index 6d9c94044..95c963946 100644
--- a/modules/aggregator/aggregator.admin.inc
+++ b/modules/aggregator/aggregator.admin.inc
@@ -31,7 +31,7 @@ function aggregator_view() {
}
$output .= theme('table', $header, $rows);
- $result = db_query('SELECT c.cid, c.title, count(ci.iid) as items FROM {aggregator_category} c LEFT JOIN {aggregator_category_item} ci ON c.cid = ci.cid GROUP BY c.cid, c.title ORDER BY title');
+ $result = db_query('SELECT c.cid, c.title, COUNT(ci.iid) as items FROM {aggregator_category} c LEFT JOIN {aggregator_category_item} ci ON c.cid = ci.cid GROUP BY c.cid, c.title ORDER BY title');
$output .= '<h3>' . t('Category overview') . '</h3>';
diff --git a/modules/simpletest/tests/database_test.test b/modules/simpletest/tests/database_test.test
index 09d209bc4..c528360b4 100644
--- a/modules/simpletest/tests/database_test.test
+++ b/modules/simpletest/tests/database_test.test
@@ -604,7 +604,7 @@ class DatabaseUpdateTestCase extends DatabaseTestCase {
$num_updated = db_update('test')->fields(array('job' => 'Musician'))->condition('job', 'Singer')->execute();
$this->assertIdentical($num_updated, 2, t('Updated 2 records.'));
- $num_matches = db_query("SELECT count(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
+ $num_matches = db_query("SELECT COUNT(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
$this->assertIdentical($num_matches, '2', t('Updated fields successfully.'));
}
@@ -615,7 +615,7 @@ class DatabaseUpdateTestCase extends DatabaseTestCase {
$num_updated = db_update('test')->fields(array('job' => 'Musician'))->condition('age', 26, '>')->execute();
$this->assertIdentical($num_updated, 2, t('Updated 2 records.'));
- $num_matches = db_query("SELECT count(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
+ $num_matches = db_query("SELECT COUNT(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
$this->assertIdentical($num_matches, '2', t('Updated fields successfully.'));
}
@@ -638,7 +638,7 @@ class DatabaseUpdateTestCase extends DatabaseTestCase {
$num_updated = $update->execute();
$this->assertIdentical($num_updated, 1, t('Updated 1 record.'));
- $num_matches = db_query("SELECT count(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
+ $num_matches = db_query("SELECT COUNT(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
$this->assertIdentical($num_matches, '1', t('Updated fields successfully.'));
}
}
@@ -669,7 +669,7 @@ class DatabaseUpdateComplexTestCase extends DatabaseTestCase {
$num_updated = $update->execute();
$this->assertIdentical($num_updated, 2, t('Updated 2 records.'));
- $num_matches = db_query("SELECT count(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
+ $num_matches = db_query("SELECT COUNT(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
$this->assertIdentical($num_matches, '2', t('Updated fields successfully.'));
}
@@ -682,7 +682,7 @@ class DatabaseUpdateComplexTestCase extends DatabaseTestCase {
->execute();
$this->assertIdentical($num_updated, 2, t('Updated 2 records.'));
- $num_matches = db_query("SELECT count(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
+ $num_matches = db_query("SELECT COUNT(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
$this->assertIdentical($num_matches, '2', t('Updated fields successfully.'));
}
@@ -695,7 +695,7 @@ class DatabaseUpdateComplexTestCase extends DatabaseTestCase {
->execute();
$this->assertIdentical($num_updated, 1, t('Updated 1 record.'));
- $num_matches = db_query("SELECT count(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
+ $num_matches = db_query("SELECT COUNT(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
$this->assertIdentical($num_matches, '1', t('Updated fields successfully.'));
}
@@ -708,7 +708,7 @@ class DatabaseUpdateComplexTestCase extends DatabaseTestCase {
->execute();
$this->assertIdentical($num_updated, 2, t('Updated 2 records.'));
- $num_matches = db_query("SELECT count(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
+ $num_matches = db_query("SELECT COUNT(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
$this->assertIdentical($num_matches, '2', t('Updated fields successfully.'));
}
@@ -721,7 +721,7 @@ class DatabaseUpdateComplexTestCase extends DatabaseTestCase {
->execute();
$this->assertIdentical($num_updated, 1, t('Updated 1 record.'));
- $num_matches = db_query("SELECT count(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
+ $num_matches = db_query("SELECT COUNT(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
$this->assertIdentical($num_matches, '1', t('Updated fields successfully.'));
}
@@ -738,7 +738,7 @@ class DatabaseUpdateComplexTestCase extends DatabaseTestCase {
->execute();
$this->assertIdentical($num_updated, 1, t('Updated 1 record.'));
- $num_matches = db_query("SELECT count(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
+ $num_matches = db_query("SELECT COUNT(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
$this->assertIdentical($num_matches, '1', t('Updated fields successfully.'));
$person = db_query("SELECT * FROM {test} WHERE name = :name", array(':name' => 'Ringo'))->fetch();
diff --git a/modules/taxonomy/taxonomy.admin.inc b/modules/taxonomy/taxonomy.admin.inc
index 568267f54..f809529c9 100644
--- a/modules/taxonomy/taxonomy.admin.inc
+++ b/modules/taxonomy/taxonomy.admin.inc
@@ -266,7 +266,7 @@ function taxonomy_overview_terms(&$form_state, $vocabulary) {
// We are not calling taxonomy_get_tree because that might fail with a big
// number of tags in the freetagging vocabulary.
$results = pager_query(db_rewrite_sql('SELECT t.*, h.parent FROM {taxonomy_term_data} t INNER JOIN {taxonomy_term_hierarchy} h ON t.tid = h.tid WHERE t.vid = %d ORDER BY weight, name', 't', 'tid'), $page_increment, 0, NULL, $vocabulary->vid);
- $total_entries = db_query(db_rewrite_sql('SELECT count(*) FROM {taxonomy_term_data} t INNER JOIN {taxonomy_term_hierarchy} h ON t.tid = h.tid WHERE t.vid = :vid'), array(':vid' => $vocabulary->vid));
+ $total_entries = db_query(db_rewrite_sql('SELECT COUNT(*) FROM {taxonomy_term_data} t INNER JOIN {taxonomy_term_hierarchy} h ON t.tid = h.tid WHERE t.vid = :vid'), array(':vid' => $vocabulary->vid));
while ($term = db_fetch_object($results)) {
$key = 'tid:' . $term->tid . ':0';
$current_page[$key] = $term;