Skip to main content
Commonmark migration
Source Link

You basically need to keep track the new and old id from mo_sms

  1. load all DB2.mo_sms that you want to copy
  2. for each row in this result set
    1. store the actual DB2.mo_sms id
    2. save this row on DB1.mo_sms
    3. store the new DB1.mo_sms id, you can use LAST_INSERT_ID()
    4. load all DB2.mt_sms entries related to id that you stored on step 2.1
    5. save all entries on DB1.mt_sms changing the mt_sms.id_MO to the new id received on DB1 (the one which you stored on 2.3)

This should work.

Edit 1:

#Edit 1: YouYou can do it using an external programming language or stored procedure, if you choose to use a stored procedure, you will need to deal with cursors

You basically need to keep track the new and old id from mo_sms

  1. load all DB2.mo_sms that you want to copy
  2. for each row in this result set
    1. store the actual DB2.mo_sms id
    2. save this row on DB1.mo_sms
    3. store the new DB1.mo_sms id, you can use LAST_INSERT_ID()
    4. load all DB2.mt_sms entries related to id that you stored on step 2.1
    5. save all entries on DB1.mt_sms changing the mt_sms.id_MO to the new id received on DB1 (the one which you stored on 2.3)

This should work.

#Edit 1: You can do it using an external programming language or stored procedure, if you choose to use a stored procedure, you will need to deal with cursors

You basically need to keep track the new and old id from mo_sms

  1. load all DB2.mo_sms that you want to copy
  2. for each row in this result set
    1. store the actual DB2.mo_sms id
    2. save this row on DB1.mo_sms
    3. store the new DB1.mo_sms id, you can use LAST_INSERT_ID()
    4. load all DB2.mt_sms entries related to id that you stored on step 2.1
    5. save all entries on DB1.mt_sms changing the mt_sms.id_MO to the new id received on DB1 (the one which you stored on 2.3)

This should work.

Edit 1:

You can do it using an external programming language or stored procedure, if you choose to use a stored procedure, you will need to deal with cursors

added 224 characters in body
Source Link

You basically need to keep track the new and old id from mo_sms

  1. load all DB2.mo_sms that you want to copy
  2. for each row in this result set
    1. store the actual DB2.mo_sms id
    2. save this row on DB1.mo_sms
    3. store the new DB1.mo_sms id, you can use LAST_INSERT_ID()
    4. load all DB2.mt_sms entries related to id that you stored on step 2.1
    5. save all entries on DB1.mt_sms changing the mt_sms.id_MO to the new id received on DB1 (the one which you stored on 2.3)

This should work.

#Edit 1: You can do it using an external programming language or stored procedure, if you choose to use a stored procedure, you will need to deal with cursors

You basically need to keep track the new and old id from mo_sms

  1. load all DB2.mo_sms that you want to copy
  2. for each row in this result set
    1. store the actual DB2.mo_sms id
    2. save this row on DB1.mo_sms
    3. store the new DB1.mo_sms id, you can use LAST_INSERT_ID()
    4. load all DB2.mt_sms entries related to id that you stored on step 2.1
    5. save all entries on DB1.mt_sms changing the mt_sms.id_MO to the new id received on DB1 (the one which you stored on 2.3)

This should work.

You basically need to keep track the new and old id from mo_sms

  1. load all DB2.mo_sms that you want to copy
  2. for each row in this result set
    1. store the actual DB2.mo_sms id
    2. save this row on DB1.mo_sms
    3. store the new DB1.mo_sms id, you can use LAST_INSERT_ID()
    4. load all DB2.mt_sms entries related to id that you stored on step 2.1
    5. save all entries on DB1.mt_sms changing the mt_sms.id_MO to the new id received on DB1 (the one which you stored on 2.3)

This should work.

#Edit 1: You can do it using an external programming language or stored procedure, if you choose to use a stored procedure, you will need to deal with cursors

Source Link

You basically need to keep track the new and old id from mo_sms

  1. load all DB2.mo_sms that you want to copy
  2. for each row in this result set
    1. store the actual DB2.mo_sms id
    2. save this row on DB1.mo_sms
    3. store the new DB1.mo_sms id, you can use LAST_INSERT_ID()
    4. load all DB2.mt_sms entries related to id that you stored on step 2.1
    5. save all entries on DB1.mt_sms changing the mt_sms.id_MO to the new id received on DB1 (the one which you stored on 2.3)

This should work.