Its like this. I have a proyects table and I want to create an entry into a second (task_groups) table for each proyect that I have.
Like this:
SELECT name,keyid FROM proyects;
Now for each result in the above query I want to do something like this.
INSERT INTO task_groups (name,proyect,advance) VALUES ('Task for proyect proyect.name', 'proyect.keyid','0')
Where proyect.name and proyect.keyid are the values for each row resulting in the first query.
Is it possible to write a query to get what I want?