Okay
  Public Ticket #3449942
issue in ordering new table number
Closed

Comments

  • Sina started the conversation

    Hi Team,

    After updating to the latest version (5.8.1), the order of table numbers generated in the database is not done correctly
    The number of my last table in the database was 99, and my next table should have been 100, but its number has become 128!

    8981645430.png

    BR


    Attached files:  Screenshot 2023-09-02 122558.jpg

  • Sina replied

    I checked the code changes and found the reason for this

    1625132426.png
    3674496377.png

    I think the reason for doing this for you is that the table number in the database is the same as the table ID, but a problem will arise and that is that if we delete the table or tables, the order of the numbers in the database will be messed up. This is not very beautiful

    BR


  •  1,689
    Miloš replied

    Hi Sina,

    Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.

    -

    Yes, our developers have added this feature from 5.7 version,

    tables are now saved in the database by their table ID.

    -

    But if you want to have all table ID's perfectly aligned with each being 1 number higher than the previous one,

    you have to only make Manual Tables,

    , and only if you don't delete any Table, as you pointed out.


    Here is my example, if i have some Manual Tables,  they go until Table ID  21,

    but if i make an SQL Table and a couple of Excel Tables in between, 

    they will now have Table ID's 22, 23, 24 and so on.

    6729284479.png

    After few Excel Tables i add a new Manual Table,

    now this new Manual table will have ID 28, 

    so in my PhPMyAdmin in the SQL Database, the tables will 'skip the in between numbers' for any Table which is not a Manual Table.

    1055453611.png


    1897983738.png

    Also, If we delete any Table, then our Plugin's table ID count will proceed to the next table ID as you pointed out from your example.

    So, if i make a new Manual Table now, in my Database it will get named as wp_wpdatatable_29,

    but if i delete it and make a new one,

    then the new one gets number 30,

    so the order in the Database would skip one ID, as you said.

    -

    That is the current behaviour,

    and when it comes to deleting the Tables, it was like this always, in the old Plugin Versions as well,

    if we were to delete a Manual Table, it was not possible to 'retreive the deleted ID and use it on a new table'.


    You can make a development suggestion if you wish that to be changed,

    and our developers will do their best to implement a solution as soon as possible.

    Please feel free to search on our suggestions page

     to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there,  and as more people vote, the feature will move higher on the priority list.

    You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;

    and our newsletter, so you're informed about new features, bug fixes, freebies, etc.


    Kind Regards, 

    Miloš Jovanović
    [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

  • Sina replied

    Hi @Miloš

    Thank you for your complete explanation

    BR

  •  1,689
    Miloš replied

    Hi Sina,

    You're welcome, i am happy to advise.

    Anything else that we could assist with, please don't hesitate to create new tickets.

    Thank you.

    Kind Regards, 

    Miloš Jovanović
    [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