Is there a function or simple technique for moving data from one MYSQL file to another when the column names from the source file match the column names of the target file other than using mysql_fetch_array?
If so, what do you recommend?
what do you consider a mysql "file" ??
A file that I can access with phpmyadmin
you mean a database? or a table within a database?
I found SELECT INTO.
I'm tried using:
mysql_query("SELECT cliorder INTO plan2 FROM preplan") or die(mysql_error());
but got an error that said: Undeclared variable: plan2
plan2 already exists as a table. Am I on the right track?
mysql_query("INSERT INTO plan2(cliorder) SELECT cliorder FROM preplan") or die(mysql_error());
Thanks r937. It's always good to know you'll help.
you shouldn't need to run that query in a php program -- just run it in your front end app (phpmyadmin or whatever)
if you plan on copying data from one table (not file) to another more than once, you should probably re-think why
excellent points! I keep forgetting about running it through myphpadmin although php provides a way to track the work.
Thanks again r937.