sql insert multiple lines with internal selections

advertisements

I need to insert multiple rows , but some of the data have to come from inner select i having problem to construct the right sql statement for example i have :

insert into game_friends(
game_users_id,
game_users_id_name,
created_to_app_users_id,
created_to_app_users_id_name
) VALUES  ......

now the problematic part is that the created_to_app_users_id_name and game_users_id_name i can get only by using select like this:

SELECT app_users_game_users_id_name
FROM `app_users` WHERE app_users_game_users_id = $game_users_id

and

SELECT app_users_created_to_app_users_id_name
FROM `app_users`
WHERE app_users_created_to_app_users_id = $created_to_app_users_id

how can i combine it to one sql statement using mysql

UPDATE:
Thanks to all for answering , but i guess didnt explain my problem right ...
i need to insert multiple rows that means i will have like 5-7 game_users_id coming and it needs in the end look like ( with out the select here .. )

insert into game_friends(
    game_users_id,
    game_users_id_name,
    created_to_app_users_id,
    created_to_app_users_id_name
    )
VALUES
  ($game_users_id, app_users_created_to_app_users_id_name, $created_to_app_users_id,app_users_created_to_app_users_id_name ),
  ($game_users_id, app_users_created_to_app_users_id_name, $created_to_app_users_id,app_users_created_to_app_users_id_name ),
  ($game_users_id, app_users_created_to_app_users_id_name, $created_to_app_users_id,app_users_created_to_app_users_id_name ),
  ($game_users_id, app_users_created_to_app_users_id_name, $created_to_app_users_id,app_users_created_to_app_users_id_name );

where each Values entry need to be composed from select.


try this code for PHP:

$query = "insert into game_friends(
 game_users_id,
 game_users_id_name,
 created_to_app_users_id,
 created_to_app_users_id_name
) SELECT
 app_users_game_users_id,
 app_users_game_users_id_name,
 app_users_created_to_app_users_id,
 app_users_created_to_app_users_id_name
FROM `app_users` WHERE
app_users_game_users_id = $game_users_id
AND
app_users_created_to_app_users_id = $created_to_app_users_id";