When you're importing a CSV file in your database, you need to navigate to the WordPress database, and click on "Import":
Then click on "Choose file" and select your CSV file:
The structure of the file needs to be set so the first row of the file contains column headers. For example, if the table you're creating is supposed to look like this:
The structure of the CSV file should contain "COLUMN1, COLUMN2, COLUMN3" in the first row, like this:
Then, when you select that file scroll down, and check the "The first line of the file contains the table column names" check-box, so the first line is used for headers of the table; and then click on GO:
You should see a screen similar to this:
In my case, it's "TABLE 114", and you can click on it to open that database table:
To avoid having any issues when using this table in wpDataTable, my advice is to change its name (because it contains a space). So, go to the "Operations" tab:
And under "Table Options" rename that table to what you want it to be.
Just make sure not to include dots ( . ) or spaces (don't use any special characters). You can rename the table to be "table_1" for example. After you rename it, click on GO in the right corner of "Table options" section:
And that's it. You're now able to create an SQL query based table using this query (for example):
Thank you for making this plugin.
I am new to SQL and would like to know how should I add the CSV to SQL?
Previously your team promised to help me on this.
Best,
Santhosh
Hi again Santhosh
When you're importing a CSV file in your database, you need to navigate to the WordPress database, and click on "Import":
Then click on "Choose file" and select your CSV file:
The structure of the file needs to be set so the first row of the file contains column headers. For example, if the table you're creating is supposed to look like this:
The structure of the CSV file should contain "COLUMN1, COLUMN2, COLUMN3" in the first row, like this:
Then, when you select that file scroll down, and check the "The first line of the file contains the table column names" check-box, so the first line is used for headers of the table; and then click on GO:
You should see a screen similar to this:
In my case, it's "TABLE 114", and you can click on it to open that database table:
To avoid having any issues when using this table in wpDataTable, my advice is to change its name (because it contains a space). So, go to the "Operations" tab:
And under "Table Options" rename that table to what you want it to be.
Just make sure not to include dots ( . ) or spaces (don't use any special characters). You can rename the table to be "table_1" for example. After you rename it, click on GO in the right corner of "Table options" section:
And that's it. You're now able to create an SQL query based table using this query (for example):
SELECT * FROM table_1
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables