I am trying to make an insert in a table from php PDO and I have some problems since I am trying to use a select and another data at the same time.
$stmt = $db->prepare("INSERT INTO subscriptions(id_Event,pushToken,os)
:idOfEvent, (Select pushToken,os FROM users WHERE deviceUDID = :deviceUDID)");
$stmt->execute(array(':deviceUDID' => $deviceUDID,':idOfEvent' => $idOfEvent));
But it says that I have a problem in my query. I don't know how to make an insert using selects and data at the same time.