As previously announced via banners and our newsletters, support is no longer available through this platform.

For easier navigation, you can still click on "Submit a Ticket" here, choose the appropriate category, and you'll be redirected to the correct support channel for your plugin.

You can still access your previous tickets and browse public tickets, but please note that responding to tickets is no longer possible.

Paid customers: Please log in to your store account for support.

Pre-purchase questions: Use the support widget in the bottom-right corner of our websites:
https://wpamelia.com
https://wpdatatables.com
https://wpreportbuilder.com

Okay
  Public Ticket #2451976
Column error with Integer numbers
Closed

Comments

  • Marlon Rebello Viana started the conversation

    I configured one of my columns as "Integer", but whenever I add a new entry, it turns any value into: 2147483647.

    This is Mersenne's 8th prime number, this is also the limit value for 32-bit "Integer", I don't think it's a coincidence.
    Note: This value is not entered when I edit the column

    Thank you for app, Marlon Rebello Viana

  •  2,576
    Aleksandar replied

    Hello Marlon.

    Thank you for your purchase.

    The import will not work with numbers this big because the int in MySQL is 4 bytes long so the maximum values are -2.147.483.648 and 2.147.483.647. If you have values below 2.147.483.647, you can see in your table that numbers below that are inserted correctly. This is the INT limitation of your database, and technically it is linked to wpDataTables as well, because we're telling the code to insert the data as INT, not BIGINT.

    You can take a look at the limits here.

    Here's what you can do:

    Go to ../wp-content/plugins/wpdatatables/source/class.constructor.php and around line 117 you'll see this:

    if ($isMySql) {
                $columnCollate = '';
                $columnTextType = 'TEXT';
                $columnIntType = 'INT(11)';
                $columnDateTimeType = 'DATETIME';
                $nullable = '';
            }
    

    Change 'INT(11)' to 'BIGINT', so it looks like this:

    5615180710.png

    and after that you will be able to use large numbers.

    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