Okay
  Public Ticket #2657405
How is data saved in database?
Closed

Comments

  • Alds started the conversation

    Hi support team, 

    Can you clarify how wpdatatables saves data in a database?  Is it saved in the WP tables or can we define one database table for example per indicator, report, or dataset? Or can we choose between the two?  Please include links to documentation where I can get more details.  

    Finally, does your plugin include helper functions to make CRUD operations work with custom PHP code?

    Thanks a lot!

     

  •  2,572
    Aleksandar replied

    Hello Alds

    Thank you for your interest in our plugin.

    Manual tables are automatically created in the database as "wp_wpdatatable_#", where "wp_" is the default database prefix, so it could be another prefix on your end, and # is the ID of the manual table in the database. This ID is not related to the ID of a table in the plugin.

    Tables linked to an existing data source (Google CalendarCSVExcelJSONXML and PHP Array) are not being saved in the database. Their structure and settings are defined in "wp_wpdatatables" and "wp_wpdatatables_columns" tables in the database.

    With imported tables, the data source is read at the moment of table creation, and a manual table is created from the source. That means that once the plugin creates the table from an external imported source, that table is no longer linked to the source, and is saved as a manual table in the database.

    You can also create tables linked to existing database tables using SQL Query based tables. They read the tables or columns you've included in a query, and create a table which is not saved in the database as a new table, but behaves the same as Excel, CSV, Google Spreadsheet, etc. linked tables.

    Database-based tables (manual, imported and SQL) are CRUD tables, but the PHP SQL parser we use has some limitations. Queries with JOIN, UNION, CONCAT, subqueries, etc can't be edited properly, nor will search, filtering and sorting work correctly for tables with such queries.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia 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