I\'m writing a stored procedure which should pass its arguments to IN (..) part of query in the procedure body, like this:
IN (..)
DELIMITER // CREATE
You should be able to use MySQL's FIND_IN_SET() to use the list of ids:
CREATE PROCEDURE `get_users_per_app` (id_list TEXT) BEGIN SELECT app_id, GROUP_CONCAT(user_id) FROM app_users WHERE FIND_IN_SET(app_id, id_list) > 0 GROUP BY app_id; ...