Drupal 6 查询语法有一些问题。我的查询本身就可以正常工作:
SELECT term_node.tid, term_data.name FROM term_node, term_data WHERE nid = 22640
以下是我将其转换为与 drupal 6 一起使用时所拥有的内容:
$currentTIDs = db_query("SELECT {term_node}.tid, {term_data}.name FROM {term_node}, {term_data} WHERE nid = 22640");
while ($cTids = db_fetch_object ($currentTIDs)) {
array_push($currentTIDsArray, $cTids);
}
drupal_set_message('<pre>' . print_r($currentTIDsArray, TRUE) . '</pre>');
这会导致一个空的查询/数组?有任何想法吗?