I am working on Codeigniter for assigning multiple roles to the single user. For that I have created a table with following values.
Array
(
[Id] => 1
[Store_address_id] =>
[Customer_ref_id] => 193
[Role_ref_id] => 1
[Email_alert] => 0
[Sms_alert] => 0
[Admin_view] => 0
[Admin_save] => 0
[Admin_delete] => 0
[Master_view] => 1
[Master_save] => 1
[Master_delete] => 1
[Business_view] => 0
[Business_save] => 0
[Business_delete] => 0
[Analytics_view] => 1
[Analytics_delete] => 1
[Analytics_save] => 1
[Promotion_view] => 1
[Promotion_save] => 1
[Promotion_delete] => 1
)
But, in database I am having multiple rows for that I need to get the value with the validation like this
+----+----+----+
| i/p|i/p | o/p|
+----+----+----+
| 0 | 0 | 0 |
+----+----+----+
| 1 | 1 | 1 |
+----+----+----+
| 1 | 0 | 1 |
+----+----+----+
| 0 | 1 | 1 |
+----+----+----+
My table is like this
I need to validate and fetch as a single array.

customer_ref_idas primary value for fetching the values, there will bennumber of values in thecustomer_ref_idI need to get all the rows which contain 193. So, I need to validate all the columns. I either one of all rows contain i have to get output as 1. Is it possible?