Welcome to Smarter QA, Questions, Answers Community
Welcome to Smarter QA, where you can ask questions and receive answers from other members of the community. Ask anything that you want. Guests Posting are allowed.
+3 votes
28 views
asked in PHP Programming by (2.4k points)

1 Answer

0 votes

Copy one table data to another using PHP.

To copy one MySQL table data in another table MYSQL  query is to be used. To copy the data from one table to another table, you have to perform the query of MYSQL  in such a way that your problem is solved. In the query of MYSQL  you have to select the data from a table and You have to copy (insert) the other table. To copy the data table of the Msql table, you have to do the following query to MYSQL.

INSERT INTO table 2 

SELECT * FROM  table 1  WHERE ...

How to MySQL copy query will work. 

Insert into table 2 - Insert the data into table 2 

SELECT * FROM  table 1  WHERE ..- Select the data from table From where do you want to copy. 
1. 

You have to need to use this MYSQL query to perform the copy operation one table to another.

I have a reference for you. 

COPY ONE MYSQL DATABASE TABLE TO ANOTHER USING PHP

answered by (800 points)
edited by
...