我想知道是否有反正我可以用MongoDB/Php「分組」我的結果。如何通過MongoDB「分組」
這是我用來顯示我行代碼:
$count = $col->find(array('order_id' => array('$gt' => '0')))->count();
我需要將它們按order_id
。
顯然,我們無法在group()
作爲find()
WORKS做count()
:$countfind = $col->find()->count();
不起作用:$countgroup = $col->group($keys)->count();
我需要算上這GROUPBY請。
感謝您的幫助。
謝謝,我會試試 – Steffi 2010-07-12 07:46:26