-- INSERT with SELECT -- http://stackoverflow.com/questions/5391344/insert-with-select INSERT courses (name, location, gid) SELECT (name, location, gid) FROM courses WHERE cid = $cid