I have a table 'users' with a column of 'ID'. I want to select 2 different 'ID's' based on 2 different parameters and insert them both into another table known as 'jobs'.
INSERT INTO jobs (customer_id, client_id)
SELECT id, id from users
WHERE username = ?
AND username = ?
Basically I want to get the ID of two different people and insert them both into the new table.
I would then bind the parameters to ?, and they would look something like 'john' and 'steve'. I have tried the code above but I know it is the wrong syntax. Any ideas would be greatly appreciated. Thanks