Jump to content

moving rows to new table with wildcards SOLVED


niche
 Share

Recommended Posts

I need to move a row from one table to another table that shares the same structure. Is there a way to do that with wildcards? I thought something like this might work, but no go.

mysql_query("INSERT INTO trkg_arc (*) SELECT * FROM trkg WHERE id = 3") or die(mysql_error());

Edited by niche
Link to comment
Share on other sites

Lost the "(*)" and achieved the desired result.

mysql_query("INSERT INTO trkg_arc SELECT * FROM trkg where id = 2 ") or die(mysql_error());

Thanks for reading.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...