我有一个使用 MySQL 通过 CodeIgniter 生成的数据集。我需要在 View 页面中获取总交付数量。为此,我使用了以下代码。
<?php $delivered_qty_total += $row->quantity; endforeach; ?>
<?php endif; ?>
但它没有给出交付数量的准确总数。我正在使用 GROUP_CONCAT
传递数据与 SEPARATOR "<br />"
.当我使用tbl_order_products.quantity
时而不是GROUP_CONCAT
它给了我准确的总数。但我需要 GROUP_CONCAT
.
'GROUP_CONCAT(tbl_order_products.quantity SEPARATOR "<br />" ) as quantity ',
最佳答案
关于php - 与 CodeIgniter 中的 GROUP_CONCAT 相呼应的多行数据总和,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25356292/