Jump to content

Recommended Posts

(Posted this in the MySQL section, but i think the php section might be the proper place)

 

I have a webshop db where i want to export some things linke order information to another external db on another server etc.

Example of things to move:

Table1
- orderid
- orderdate
Table2
- adress
- shippingmethod

I ONLY want it to export and import things that is not currently there.

How can this be done in a php script?

 

Link to comment
https://forums.phpfreaks.com/topic/292285-copy-content-from-one-db-to-external-db/
Share on other sites

Sorry I don't have any answers for you. I just wanted to let you (and anyone looking this topic) know that I hid your other topic under the MySQL section. Having duplicate topics can cause confusion among those responding. Especially if both topics get responses.  :happy-04:

Depends on the volume exported

 

1000 or less

  • read from server1 table
  • store in array
  • connect to second server
  • insert from the array

 

more than 1000

  • read from server1 table
  • write to a csv file
  • connect to second server
  • use LOAD DATA INFILE to insert records
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.