I have 3 SQL tables. clients events client_events Because a client can have multiple events, I made the third table to show those relationships. I am using the following code to retrieve all of the clients that have the have a record matching this event, but it is only returning 1 record when there are multiple. What am I overlooking?
Tag: where-in
How to do this in laravel using Laravel subquery with groupby and where
select * from `eplan_vacancy` where `reference_id` in (select `eplan_ep_details`.`reference_id` from `eplan_ep_details` inner join `eplan_court_cases` on `eplan_ep_details`.`…
CodeIgniter : how to write where_in OR where_in query?
I’m using codeigniter to query a database, and I need to conditionally compare arrays in the where clause. So basically I want to do: where_in OR where_in depending on what array has data in it. So I will have either an array of user_id OR an array of area_id’s. I’m not sure how to combine the where_in comparison. This is