I have content that i want to filter by a brandname and a permission id and then show it.
my problem is: When i send one value as $permission it works fine. But when a user has multiple permission_id's it doesnt work.
WHERE permission_id
= 1, 2, 3;
I have a problem with my select query:
Codeigniter:
$this->db->select('*');
$this->db->from('content');
$this->db->where('brand_name', $brand);
$this->db->where('permission_id', $permission);
SQL:
SELECT * FROM `content` WHERE `brand_name` = $brand_name AND `permission_id` = $permission;
The print_r of $brand & $permission look like this:
Hyundai
1,10,11,2,3,4,5,6,7,8,9
I hope i gave enough information for someone to help me like this.
thank you.