I have spent a week writing this incredibly long query which is dynamically created by over 1000 lines of PHP code and crosses 6 tables (so far - 6 joins) and over 80 fields and it includes math equations in it that I don't even quite understand. I need to take it to the next level now.
Is there a way for me to add to it, so that it automatically inserts all the retrieved records into a 7th table? I'm not sure if this is possible or not but if it is I am thinking that having the query do it would be more efficient than writing PHP to insert the results.
If it is possible can you please write an example of how it can be done or provide me with a link or search phrase to learn how to do it?
Crazy MAD Query I Love IT!!!
Moderator: General Moderators
-
crackedPavement
- Forum Newbie
- Posts: 11
- Joined: Wed Mar 01, 2006 8:18 pm
- Location: portland, or
...
I think the question that you should be asking is why.
Code: Select all
CREATE TABLE table ( SELECT .... );