我在 mongodb 中有以下类型的集合:
Array
(
[_id] => 4fcf383a5990581c0b000015
[user_id] => 1
[username] => admin
[password] => 21232f297a57a5a743894a0e4a801fc3
[first_name] => admin
[last_name] => admin
[address] =>
[address_2] =>
[deshboard_report] => Array
(
[0] => Array
(
[report_ids] => 1
[rpt_color] => color-red
[rpt_status] => max
[report_title] => Last Point
[report_file] => last_location
)
[1] => Array
(
[report_ids] => 2
[rpt_color] => color-green
[rpt_status] => max
[report_title] => Inactive Device
[report_file] => inactive_devices
)
)
)
我想搜索report_ids
,搜索返回子数组deshboard_report
怎么可能?
我使用这个库来连接:https ://github.com/alexbilbie/codeigniter-mongodb-library