我已经使用Drupal 7和Ubercart 3开发了一个音乐商店,我正在使用JasperReports ( iReport ) 来构建报告。我正在检索包含在 taxonomy_index 表中属于某个节点的多个分类术语,因此我可以在报告中显示。
例如节点 id 13 有 3 个术语。
我的挑战是我当前的查询只显示一个词。请您帮助我的查询以显示更多条款。
SELECT
taxonomy_term_data.`name` AS taxonomy_term_data_name,
taxonomy_vocabulary.`name` AS taxonomy_vocabulary_name,
uc_order_products.`qty` AS uc_order_products_qty,
uc_order_products.`price` AS uc_order_products_price,
node.`type` AS node_type,
node.`title` AS node_title,
uc_orders.`created` AS uc_orders_created
FROM
`uc_order_products` uc_order_products INNER JOIN `node` node ON uc_order_products.`nid` = node.`nid`
INNER JOIN `taxonomy_index` taxonomy_index ON node.`nid` = taxonomy_index.`nid`
INNER JOIN `taxonomy_term_data` taxonomy_term_data ON taxonomy_index.`tid` = taxonomy_term_data.`tid`
INNER JOIN `taxonomy_vocabulary` taxonomy_vocabulary ON taxonomy_term_data.`vid` = taxonomy_vocabulary.`vid`
INNER JOIN `uc_orders` uc_orders ON uc_order_products.`order_id` = uc_orders.`order_id`
WHERE
taxonomy_term_data.`tid` = 11