Okay
  Public Ticket #1953420
Out of sequence table numbers
Closed

Comments

  • Tony started the conversation

    Hi, I just bought this product yesterday and am very impressed so far but have run into a problem.  When I first created a table I saw that it created a table in my WordPress database that related to the Wptable shortcode.  This was all goo, and I created a second and third table with no issue.  When WPDataTable created a table and gave it a shortcode of 'WPDataTable1' it also created a table in my wordpress that was numbered ".....1". 

    My problem came when I created a table using the HTML link and associated it with a Google spreadsheet.  This resulted in WPDataTable creating a Table and used the ending number of 4, however it didn't create a wordpress table because the data was from a Google sheet.  So when I created another table it called it "......5", however it created a table in my wordpress database that ended with the number 4.  So every table I created now has a shortcode that is not the same as the Wordpress table number and I cannot access the data as I was able to before creating the Google Sheet association.  The numbers are out of whack.  I hope this makes sense and lets you know the issue I'm now having.  Thanks.

  •  2,572
    Aleksandar replied

    Hello thetonydavis.

    Thank you for your purchase.

    I am sorry, but I don't understand what's the exact issue you're having here.

    The table created by linking to a Google Spreadsheet is not being stored in the database, and that's default behavior of the plugin. When you create a table from external data sources like Google Spreadsheets, CSV or Excel, that table is just displaying the contents of the external data source, and you can't edit it. That's why it's not being stored in the database.

    Now, every new table that gets stored in the DB (Manual, SQL query based, imported from data sources, etc.) will be stored in the database, and will be auto-assigned with the next ID. That's basically exactly what you explained - you had 3 tables created manually and they got stored in the DB like wpdatatable_1, wpdatatable_2 and wpdatatable_3. Then you added a Google Spreadsheet table which hasn't been added to the database; and then you added a new manual table and it got stored like wpdatatable_4.

    Are any of the tables malfunctioning, or is it just that the numbers are not the same in the plugin and in the database?

    Best regards.

    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

  • Tony replied

    Thanks for your quick response.  The summary you provided is correct but I'll try and explain the problem.

    Excel Spreadsheet table created and auto assigned [WPDATATABLE ID=1]  DB Table created called "#####1"

    Excel Spreadsheet table created and auto assigned [WPDATATABLE ID=2] DB Table created called "#####2"

    Excel Spreadsheet table created and auto assigned [WPDATATABLE ID=3] DB Table created called "#####3"

    Google Spreadsheet table created and auto assigned [WPDATATABLE ID=4] No DB Table created

    Excel Spreadsheet table created and auto assigned [WPDATATABLE ID=5] DB Table created called "#####4"

    So it appears that the WordPress Database also assigns a sequential number to the database that it creates.  On my first three examples the numbers of the Database and WPDATATABLE were in sync but now they are noe.


    I'm using Gravity Forms and an addon called Gravity Wiz that can pull data and populate form drop down lists via the DB.  It specifically asks for the Wordpress database that should be accessed and that is where you can see the the discrepancy in numbers.

    I've had problems since I created the Google Spreadsheet and the TableID and DB numbers bacame out of sync but that doesn't mean that it not caused by something I'm doing wrong.  Since I'm still 'new' to creating tables within the DB and retrieving data out of the DB this may be something I'm doing wrong.

    If you let me know that there should be no problem with the out of sequence DB number and TableID number then I'll just keep trying on my end to see what I'm doing wrong.

    Thanks.


  •  2,572
    Aleksandar replied

    Hello again thetonydavis.

    Like I said in my previous reply - the Google Spreadsheet table created using the first option (Linked to an existing data source) doesn't create the table in the DB. If it added the Excel based tables - I'm lead to believe you used the third option. So if you were to add the Google Spreadsheet using the same method - it'll create it in the DB:

    1831481873.png

    However - this will make the table "manual" - meaning if you change something in the Google Spreadsheet it will not reflect in this table.

    Basically, what you said makes sense if you imported those Excel files - You have three imported tables that created three tables in DB, then you linked to a Google Spreadsheet, and it wasn't stored in the DB, so again when you added a new imported Excel table - it came up with #4.

    Please let me know if what I'm saying makes sense.

    Best regards.

    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