MySQL Forums
Forum List  »  PHP

An INSERT SELECT query
Posted by: David Courtney
Date: January 30, 2006 04:09AM

Hello,I have 2 fairly similar tables that only have some a few different fields and would like to copy one row from one table to the other. I was trying to use this command:

$testing = mysql_query("INSERT INTO fc_user_lang SELECT * FROM fc_def_lang") or die("Error:".mysql_error());

but obviously the tables are not exactly the same so it cannot match the exact field names. Is there a way I can select the fields that I do not want to copy over?

Thanks

David

Options: ReplyQuote


Subject
Written By
Posted
An INSERT SELECT query
January 30, 2006 04:09AM
January 30, 2006 05:38AM
January 30, 2006 06:18AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.