0
我想添加來自'sales_flat_order_status_history'表的最新評論。排序信息DESC裏面joinLeft在網格magento
$collection->getSelect()->joinLeft('sales_flat_order_status_history',
'main_table.entity_id = sales_flat_order_status_history.parent_id',
array('comment'=> new Zend_Db_Expr(
'(SELECT group_concat(`sales_flat_order_status_history`.comment SEPARATOR ",")
FROM `sales_flat_order_status_history` As `sales_flat_order_status_history`
WHERE `main_table`.`entity_id` = `sales_flat_order_status_history`.`parent_id`)')));
但它不工作。有人可以幫我嗎?