I am using CodeIgniter in my application. I have a code like this
$this->db->where(‘a.PreferenceID NOT IN (SELECT PreferenceParentID
FROM ‘.$table.’ WHERE EntityID=’.$shop_id.’)’, NULL, FALSE);
I want to pass an array instead of $shop_id.
Like
$arr = array(1,3,5);
WHERE EntityID='. $arr.'
it will be equal to
WHERE (EntityID='. $arr[0].' OR EntityID='. $arr[1].' OR EntityID='. $arr[2].')
Because I want to check with multiple shop id’s. What is the best way?
use
INclause like