B
B
blabs2017-03-17 12:18:44
MySQL
blabs, 2017-03-17 12:18:44

How to upload CSV to MySQL with data spread across tables?

You need to import the contact database into CRM. The system itself does not have an import function, so this can only be done through the database. There is a CSV file with certain fields. The database has its own structure, in each table you need to substitute your own data.
How technically can this be done?
Structure looks like this

  1. Client table - https://www.dropbox.com/s/yiyry32cmcawhx8/Screensh...
  2. User Table - https://www.dropbox.com/s/nfk1cttocw25nus/Screensh...
  3. Custom fields table for companies and contacts (displayed Status, Category, email 2/3, phone 2/3, etc.) - https://www.dropbox.com/s/lz7oepxs6m0nlg3/Screensh...
  4. An example base to download - https://www.dropbox.com/s/dmgkxwnry8asj3w/example....

By structure, the contact is tied to the client. In the custom fields table, we set up all the necessary fields for the customer card and contact.
CRM Developer Comments
--------------
If you want to add clients, please take a look at clients table in database.
There are some simple fields, If you insert data there, that will be appear in clients section.
If you want to insert contacts, please take a look at users table.
The following fields are important:
first_name, last_name, email, user_type = "client", status='active', client_id, is_primary_contact.
--------------
Can you suggest an example of a SQL query or script that will allow you to load the database into a database with data distribution across tables?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question