具有以下数组:
Array
(
[notifys] => Array
(
[0] => Array
(
[notifytype_id] => 10
[notify_total] => 1
)
[1] => Array
(
[notifytype_id] => 11
[notify_total] => 1
)
[2] => Array
(
[notifytype_id] => 14
[notify_total] => 3
)
[3] => Array
(
[notifytype_id] => 14
[notify_total] => 3
)
[4] => Array
(
[notifytype_id] => 14
[notify_total] => 2
)
[5] => Array
(
[notifytype_id] => 14
[notify_total] => 32
)
[6] => Array
(
[notifytype_id] => 14
[notify_total] => 28
)
[7] => Array
(
[notifytype_id] => 14
[notify_total] => 3
)
[8] => Array
(
[notifytype_id] => 14
[notify_total] => 7
)
[9] => Array
(
[notifytype_id] => 2
[notify_total] => 7
)
[10] => Array
(
[notifytype_id] => 2
[notify_total] => 15
)
)
)
-------------------------------------------------- -------------------------------------
例如,需要一个 PHP 解决方案来添加[notify_total]
WHERE [notifytype_id] == 10
OR中的所有值 [notifytype_id] == 2
因此,此示例中的结果将是:
$结果 = 23