我在drupal 6上有这个查询
$catq=' ( SELECT term_node.nid as node_id FROM {term_node} WHERE tid='.$catint.') as cat, '
我已经像这样升级它
$query=db_select('term_node');
->addfield('term_node', 'nid', 'node');
->field('term_node', 'node' );
->condition('term_node.tid', = , $catint);
$cat=$query->addfield($query, 'cat');
这是错的吗?