0
日
鉴于此阵:PHP集团通过
array(1) {
[0]=>
array(2) {
["Project"]=>
array(5) {
["id"]=>
string(1) "2"
["user_id"]=>
string(2) "21"
["customer_id"]=>
string(1) "4"
["name"]=>
string(15) "WordPress Theme"
["created"]=>
string(19) "2011-09-26 21:30:38"
}
["Track"]=>
array(1) {
[0]=>
array(8) {
["id"]=>
string(1) "7"
["user_id"]=>
string(2) "21"
["project"]=>
string(1) "2"
["customer"]=>
string(1) "4"
["title"]=>
string(7) "Backend"
["notes"]=>
string(0) ""
["created"]=>
string(19) "2011-09-28 22:21:22"
["Lapse"]=>
array(2) {
[0]=>
array(5) {
["id"]=>
string(1) "4"
["track_id"]=>
string(1) "7"
["start"]=>
string(19) "2011-09-28 22:22:21"
["stop"]=>
string(19) "2011-09-28 22:22:30"
["created"]=>
string(19) "2011-09-28 22:22:21"
}
[1]=>
array(5) {
["id"]=>
string(1) "3"
["track_id"]=>
string(1) "7"
["start"]=>
string(19) "2011-09-28 22:22:07"
["stop"]=>
string(19) "2011-09-28 22:22:12"
["created"]=>
string(19) "2011-09-28 22:22:07"
}
}
}
}
}
}
我将如何通过组中的一天流逝阵列与PHP?这可能更容易直接使用MySQL,但我使用CakePHP的递归函数,我无法弄清楚如何使用Group By!
“这可能更容易直接使用MySQL,但我使用CakePHP的递归函数,我无法弄清楚如何使用Group By!” ---你不能用php做到这一点;-P – zerkms
我担心。回到绘图板... – benhowdle89
我刚刚在CakePHP + GROUP +关联上回答了[一个问题](http://stackoverflow.com/questions/7590402/cakephp-combining-recursive-and-group),你应该带一个看。 *编辑*刚注意到另一个问题也是你的! :) – bfavaretto