I have an dynamic array of id which is passed by frontend. I need to fetch data from mysql db where the tuples ids are match with the ids which i pass.
Example Id array: [6, 7, ...]
The number of items can be vary according to different requests.
SELECT expense_type, expense_category FROM expense_type WHERE expense_category_id=id1 OR expense_category_id=id2;
id1, id2 are the ids which comes from the frontend. (6,7,...)
There can be multiple ids which comes from the frontend. could i please know is there a way to fetch data from one query in such situation. Or else do i have to write multiple queries to execute?