Commit 737db302 authored by Dries's avatar Dries

- Changed db_queryd() to db_query().
parent 8a91f1be
......@@ -483,10 +483,10 @@ function taxonomy_term_count_nodes($tid, $type = 0) {
if (!isset($count[$type])) {
// $type == 0 always evaluates true is $type is a string
if (is_numeric($type)) {
$result = db_queryd("SELECT t.tid, COUNT(*) AS c FROM term_node t GROUP BY t.tid");
$result = db_query("SELECT t.tid, COUNT(*) AS c FROM term_node t GROUP BY t.tid");
}
else {
$result = db_queryd("SELECT t.tid, COUNT(*) AS c FROM term_node t, node n WHERE t.nid = n.nid AND n.type = '%s' GROUP BY t.tid", $type);
$result = db_query("SELECT t.tid, COUNT(*) AS c FROM term_node t, node n WHERE t.nid = n.nid AND n.type = '%s' GROUP BY t.tid", $type);
}
while ($term = db_fetch_object($result)) {
$count[$type][$term->tid] = $term->c;
......
......@@ -483,10 +483,10 @@ function taxonomy_term_count_nodes($tid, $type = 0) {
if (!isset($count[$type])) {
// $type == 0 always evaluates true is $type is a string
if (is_numeric($type)) {
$result = db_queryd("SELECT t.tid, COUNT(*) AS c FROM term_node t GROUP BY t.tid");
$result = db_query("SELECT t.tid, COUNT(*) AS c FROM term_node t GROUP BY t.tid");
}
else {
$result = db_queryd("SELECT t.tid, COUNT(*) AS c FROM term_node t, node n WHERE t.nid = n.nid AND n.type = '%s' GROUP BY t.tid", $type);
$result = db_query("SELECT t.tid, COUNT(*) AS c FROM term_node t, node n WHERE t.nid = n.nid AND n.type = '%s' GROUP BY t.tid", $type);
}
while ($term = db_fetch_object($result)) {
$count[$type][$term->tid] = $term->c;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment