jj20051 Posted June 22, 2008 Share Posted June 22, 2008 I Am Unfamiliar With This Completely So There Is No Code... How Would I Move All Of The Rows In One Table ( Using PHP ) To Another Table? Quote Link to comment Share on other sites More sharing options...
Barand Posted June 22, 2008 Share Posted June 22, 2008 CREATE TABLE anotherTable SELECT * FROM originalTable Quote Link to comment Share on other sites More sharing options...
jj20051 Posted June 22, 2008 Author Share Posted June 22, 2008 So It Would Be Something Like: mysql_query("INSERT INTO checkout (id,name,barcode,price,quantity) SELECT id,name,barcode,price,quantity FROM products") or die(mysql_error()); Quote Link to comment Share on other sites More sharing options...
Barand Posted June 23, 2008 Share Posted June 23, 2008 If the table already exists. Or you can create the table and move them with the query I posted Quote Link to comment Share on other sites More sharing options...
jj20051 Posted June 23, 2008 Author Share Posted June 23, 2008 The Table Exists So That's All I Will Need ( Other Than To Connect To The DB)? Quote Link to comment Share on other sites More sharing options...
fenway Posted June 23, 2008 Share Posted June 23, 2008 The Table Exists So That's All I Will Need ( Other Than To Connect To The DB)? Yup... but your script might timeout, so be careful. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.