Hi guys basically I have a query that select all the clientId where the flagId = 6
which is:
SELECT clientId from ClientsFlags WHERE flagId = 6;
Now I want to take the results from this query and create a new record for the each of the results obtained in the select statement
INSERT INTO clientFlags clientId, flagId VALUES('The client ID's that were obtained in the select query', 42);
What is the best way to combine these statements?
You can use the INSERT … SELECT syntax
Something like this, I haven’t test it for syntax errors