I'm trying to insert several records like this :
SET @user_id = (select `id` from users where `email` IN( '[email protected]', '[email protected]' ) );
SET @badge_id = (select `id` from badges where `slug` = 'elearning_nutrition');
INSERT INTO `instructor_badges` (`id`, `user_id`, `badge_id`, `is_active`, `is_manual`, `created`)
VALUES (UUID(), @user_id, @badge_id, '1', '0', NOW());
but im getting this error:
[ERROR in query 1] Subquery returns more than 1 row
In this case I would have to insert 2 records. How could I perform this query?