Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Jun 2008
    Posts
    632
    Plugin Contributions
    0

    Default database tables import question

    Are there any problems with importing the tables: address_book, customers and customers_info from one database into another database?

    I did this in a test cart. What I did first is delete the few existing customers and their orders from admin panel and then in phpmyadmin I imported the three tables previously saved from exported sql files.

    All appears to be ok but I'm just wondering if there could be any problems doing it this way.

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,611
    Plugin Contributions
    25

    Default Re: database tables import question

    We do this all the time. However, you do need to understand how the tables work together to ensure that you get complete sets, otherwise you can completely compromise the integrity of your database.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Jun 2008
    Posts
    632
    Plugin Contributions
    0

    Default Re: database tables import question

    Thank you.

    I've read that these three tables are the only ones involved for importing the customer info. Is that correct?

    Is there a way to import these tables without overwriting existing customer info?

  4. #4
    Join Date
    Jan 2004
    Posts
    65,335
    Blog Entries
    7
    Plugin Contributions
    229

    Default Re: database tables import question

    You haven't explained *why* you're doing this.
    There are many other things related too, such as orders/purchase history, newsletter tracking, group discounts, and so on. Without knowing the context, namely the specific business reason for doing this, the general advice is: don't mess with partial sets of data, lest you end up with problems.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Jun 2008
    Posts
    632
    Plugin Contributions
    0

    Default Re: database tables import question

    specifically to import customer names, address, email etc....the info you find in admin customers > customers. No orders attached to the customers names.

  6. #6
    Join Date
    Jan 2004
    Posts
    65,335
    Blog Entries
    7
    Plugin Contributions
    229

    Default Re: database tables import question

    Fine. If all you want to import is that info, then fine. But ... you've not mentioned anything about EXISTING stuff already in your database, including orders, group-pricing, etc, etc, etc.

    Any table that's got a customers_id field, or in some cases a variation on that spelling, probably should have ALL its data deleted if you're going to import customer records from another database.

    What you're doing is NOT recommended without having a SOLID understanding of all the database relationships.

    FOR FUTURE READERS OF THIS DISCUSSION ... DO NOT BLINDLY IMPORT DATA WITHOUT STUDYING ALL DATABASE RELATIONSHIPS THOROUGHLY.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Jun 2008
    Posts
    632
    Plugin Contributions
    0

    Default Re: database tables import question

    All customers and customer orders have been deleted to avoid clashing customer ID's

  8. #8
    Join Date
    Jun 2005
    Location
    Hertfordshire, UK
    Posts
    10,286
    Plugin Contributions
    3

    Default Re: database tables import question

    Quote Originally Posted by buildingblocks View Post
    All customers and customer orders have been deleted to avoid clashing customer ID's
    But I bought something from you last week, and now want to go into my order history to see details of the transaction...
    We host with Terranetwork.

  9. #9
    Join Date
    Jun 2008
    Posts
    632
    Plugin Contributions
    0

    Default Re: database tables import question

    I know, I know but the existing customers were few and the old customer base is wanted in there very badly, so it is one or the other, unless the customers, address book and customer info can be imported creating new ID's for them and not over write the existing tables. Maybe that's not possible.

  10. #10
    Join Date
    Jun 2005
    Location
    Hertfordshire, UK
    Posts
    10,286
    Plugin Contributions
    3

    Default Re: database tables import question

    Quote Originally Posted by buildingblocks View Post
    ... creating new ID's for them and not over write the existing tables...
    I think this is possible...

    If you go into your EXISTING database and see the LAST customer ID number... Then, in your INSERT sql for the new customers, make sure their ID numbers are sequentially numbered, starting from an integer that is ONE greater than the last ID number in your existing table.

    (Make sure you have your site in maintenance mode... you don't want someone registering during this process!)
    We host with Terranetwork.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 7
    Last Post: 27 Nov 2012, 11:20 PM
  2. Question about 'featured' and 'specials' database tables
    By apsona in forum Setting Up Specials and SaleMaker
    Replies: 3
    Last Post: 29 Nov 2010, 05:52 AM
  3. Replies: 3
    Last Post: 16 Feb 2010, 05:09 AM
  4. Create Database, Tables and Drop Database or Tables
    By elwood cordery in forum General Questions
    Replies: 3
    Last Post: 17 Aug 2009, 04:03 PM
  5. phpMyAdmin database tables export/import for categories ect. help
    By oxicottin in forum Installing on a Windows Server
    Replies: 0
    Last Post: 2 Sep 2007, 10:46 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR