I have a table in my database with adminId and clientId
There might be 20 records with the adminId of the logged in user and I'm trying to pull a list of clients.
I am wondering if there is a way i can say something like:
$this->db->where('id', '20 || 15 || 22 || 46 || 86');
I'm trying to do this with dynamic data (you never know how many clients Id's you'll need to pull). Any ideas?
$this->db->where_in('id', ['20','15','22','42','86']);
Reference: where_in
1.4m articles
1.4m replys
5 comments
56.9k users