Support » Fixing WordPress » Easy way to create and maintain multiple tables in wordpress

  • Hi everyone,

    Was wondering if there is an easy way to create and maintain multiple tables in wordpress. The information in the tables could change from time to time and so I am looking for an easy system to manage them. Example:

    Table of Candy
    1) Product: Candy A
    2) Price: 20 USD
    3) Retailer: Retailer X

    1) Product: Candy B
    2) Price: 30 USD
    3) Retailer: Retailer Y

    Table of Chocolates
    1) Product: Chocolate A
    2) Price: 40 USD
    3) Retailer: Retailer B

    1) Product: Chocolate C
    2) Price: 35 USD
    3) Retailer: Retailer X

    Both the price and retailer selling change all the time and both tables are on different pages of my website. I have over 10 such tables to manage.

    Plugins like Tablepress allow you to upload tables in CSV format however, they only apply to one table.

    Ideally, I was wondering if there is a solution that allows me to update an excel file and upload it to a plugin which then updates all various tables with the revised information?

    Thank you.

    • This topic was modified 2 years, 1 month ago by Jajabingz.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @ferryavb,

    My initial thought is ‘No’. In my experience, the upload CSV to make a WordPress table plugins convert the data in the CSV into HTML within a WordPress page or post. As such, trying to update the content in the website table from (for example) an updated CSV via the plugin would not update the website table, but rather, would create a new table.

    As such, it may be a suitable work around: keep your offline CSV files up-to-date with fresh prices and details; then upload those tables to the site as needed, replacing the previously created table with that out of date information.

    Admittedly, this process is not ideal, but may be a workable short term fix.

    Hi @liamdempsey,

    Thanks for your reply. I was talking hypothetically about such a plugin. Currently, I have not located such a plugin.

    In the meantime, may I know what suggestions you have that can solve my issue?

    Thank you.

    Or is there a way to create a self-hosted database and then use code to extract data from there? Not sure if this is even possible?

    Or is there a way to create a self-hosted database and then use code to extract data from there? Not sure if this is even possible?

    There certainly is.
    Your plugin would register shortcodes which operate upon custom tables in the database. Different shortcodes would query database tables and report the results in HTML tables, OR validate the user credentials and update the database etc.
    Using shortcodes is described here:
    http://codex.wordpress.org/Shortcode_API
    When I was getting started with custom tables I found this plugin useful:
    https://wordpress.org/plugins/wp-csv-to-database/
    It gave me the immediate ability to load tables, but also showed me how to do the database interactions and user interactions using forms.

    I have developed many applications using this technique.

    • This reply was modified 2 years, 1 month ago by RossMitchell. Reason: clarified ambiguous terminology
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Easy way to create and maintain multiple tables in wordpress’ is closed to new replies.