Hi all,
How could I transfer 1 returned row from table A, into table B without getting each column's data in that row (from A) and then doing an insert statement into table B.
Is there a function or sql language to do this?
Thanks
Transfer 1 row from Table A to Table B?
Moderator: General Moderators
I don't believe there's an automatic way to so this, since it's unusual to have two tables with identical structures that would make it safe to do what you're describing.
You could write a function in PHP that would create an insert statement based on the row data returned from your query. You could then submit this input statement to MySQL. This would avoid having to hard-code each individual column name in your code.
You could write a function in PHP that would create an insert statement based on the row data returned from your query. You could then submit this input statement to MySQL. This would avoid having to hard-code each individual column name in your code.
-
Elena Mitovska
- Forum Newbie
- Posts: 6
- Joined: Mon Nov 18, 2002 3:43 am
- Location: Ukraine
- Contact: