I need to copy a table from one database to another. This will be a cronjob. Which one is the best way to do it? PHP script or Shell Script. The problem with PHP, both datab
If you need to copy the table on the same server you can use this code:
USE db2; CREATE TABLE table2 LIKE db1.table1; INSERT INTO table2 SELECT * FROM db1.table1;
It's copy+pasted from here: codingforums.com
It's not my solution, but I find it useful.