[eluser]megabyte[/eluser]
I want to know if i can save some php timeand do this straight in the db.
What i want to do, is do 2 selects from the same table then insert it into another table.
I know there is "select insert" but not sure how to do it here.
// run all three queries below as one
select from lessons where course_id = 1 ORDER BY RAND() LIMIT 3;
select from lessons where course_id = 3 ORDER BY RAND() LIMIT 5;
select insert into users_lessons