richclever
IS-IT--Management
Hi,
I want to export some data from one database to another but unfortunately my host won't allow inbound or outbound connections so I can't connect to the remote host.
What I thought I'd do to get around the problem is to write the mysql commands to a text file which can then be run on the remote server (I can ftp it). How do I send the mysql statements to an external text file?
For example, if I have
$query1 = "insert into listingsDB (ID,user_ID,Title,expiration,notes,creation_date,last_modified,hitcount,featured,leaseb,depno,active) values ('$l','444','$title[$count]','2006-01-01',' ','2005-01-01','NULL','1','no','no','$departmentid[$i]','yes')" ;
$result1 = @mysql_query ($query1);
How do I write this into a mysql text file (obviously it will need to have the data contained in the variables).
Thanks a lot,
Richard
I want to export some data from one database to another but unfortunately my host won't allow inbound or outbound connections so I can't connect to the remote host.
What I thought I'd do to get around the problem is to write the mysql commands to a text file which can then be run on the remote server (I can ftp it). How do I send the mysql statements to an external text file?
For example, if I have
$query1 = "insert into listingsDB (ID,user_ID,Title,expiration,notes,creation_date,last_modified,hitcount,featured,leaseb,depno,active) values ('$l','444','$title[$count]','2006-01-01',' ','2005-01-01','NULL','1','no','no','$departmentid[$i]','yes')" ;
$result1 = @mysql_query ($query1);
How do I write this into a mysql text file (obviously it will need to have the data contained in the variables).
Thanks a lot,
Richard