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

From: Date: Fri, 23 Mar 2001 19:00:11 +0000
Subject: RE: [PHP] Move data from one MySql table to another?
Groups: php.general 
Request: Send a blank email to php-general+get-45329@lists.php.net to get a copy of this message
Remove the "values" in your sql and see -- On Fri, 23 Mar 2001 13:00:23 Boget, Chris wrote: >> 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 > Get 250 color business cards for FREE! at Lycos Mail http://mail.lycos.com/freemail/vistaprint_index.html

« previous php.general (#45329) next »