I have a query which will return some ids.
SELECT ID FROM xf_menu WHERE m.modul_id = 13;
Then there is a simple insert query
INSERT INTO xp_uziv_menu (menu_id, modul_id, right) VALUES (???, 136, 3);
the values 136 and 3 are constants.
I’m wondering if is it possilbe to write a query where the ids would be passed from the first query to the insert query and executed.
I tried this syntax but it doesn’t work.
INSERT INTO
xp_uziv_menu (menu_id, modul_id, right)
VALUES
(SELECT ID FROM xf_menu WHERE m.modul_id = 13, 136, 3);
Maybe something like this: