I have a table like this
| ids | name | status |
----------------------------------
| 1 | name1 | true |
| 2 | name2 | true |
| 3 | name1 | true |
| 4 | name4 | true |
| 5 | name1 | false |
| 6 | name2 | false |
| 8 | name1 | false |
| 9 | name1 | true |
| 10 | name1 | false |
| 11 | name1 | false |
I want to fetch the row where (name = name1 or name2) and count of all true status(for eg. in the table total_true_count=4 [ie. all row of these ids ids=1,2,3,9] ) and all false status(for eg. in the table total_false_count=5 ie. [all row of these ids=5,6,8,10,11] ) of the selected row.
Output will be like this
$output=Array
(
[total_true_count] => 4,
[total_false_sms] => 5,
[row_data]=>{row1,row2....}
)
I tried count function but it not working for me. can anyone please help