RE: [PHP] Move data from one MySql table to another?

From: Date: Fri, 23 Mar 2001 19:00:23 +0000
Subject: RE: [PHP] Move data from one MySql table to another?
Groups: php.general 
Request: Send a blank email to php-general+get-45327@lists.php.net to get a copy of this message
> MySQL only supports INSERT ... SELECT ... and REPLACE ... SELECT ... > Independent sub-selects will probably be available in Version > 4.0. You can now use the function IN() in other contexts, however. I tried the query in the original post and I could not get it to work. This is what I got: mysql> insert into new_names (name, email) values select name, email from old_names; ERROR 1064: You have an error in your SQL syntax near 'select name, email from old_names' at line 1 What's going wrong if this is supposed to work? I'm using mySQL 3.22.32 Chris

« previous php.general (#45327) next »