Hello! I want to copy user's accound of mySQL (eg sqlname = 'users') to another, that name is 'mailing' Could it possible? Can anyone helps me? Yours, JimKarvo
Yes, I can do that, but I would prefer something automatically! I mean to run a file and transfer the tables.. :S
you will need to create the database structure(all the tables, and their structure),then select each data from each table and insert it in the new database. I haven't tested, but I think the bellow code will work. $query=mysql_query("SELETC * FROM `table1` LIMIT 1000"); while($row=mysql_fetch_array($query)){ //you establish a 2nd connection with the remote host/localhost $newquery=mysql_query("INSERT INTO `table1` VALUES('".$row['data1']."', '".$row['data2']."')"); } PHP: