Okay
  Public Ticket #866463
creating a table with a field greater than varchar (255)
Closed

Comments

  •  3
    intk started the conversation

    Hello,

    i realised now that all datas i've uploaded and imported with constructor are limited to 255 char (varchar).

    how may i create a field in a table with type "mediumtext" or "longtext"?

  • [deleted] replied

    Hi,

    Thank you for your purchase.


    Easiest way is to just change it to desirable type in MySQL. You can follow this tutorial for phpMyAdmin.

    If you want to change default value for creating new tables you can find it in

    ../wp-content/plugins/wpdatatables/source/class.constructor.php

    around line 150


    Please help us make our product better by filling out this survey where you can also vote for new features.

    Hope this helps, 

    Miljko Milosevic

    [email protected]

  •  3
    intk replied

    hello, since i need to add more than 600 char in 2 different tables,

    i modified the value as You described me, but i got an error...

    constructor read and load the table from my excel file, but is not able to correctly save it. infact the table is empty...

    please see attached files for details

  • [deleted] replied

    Hi,


    Please send me your excel file so I can take a look.


    Please help us make our product better by liking our Facebook page where you can see all news related to plugin.

    Hope this helps, 

    Miljko Milosevic

    [email protected]

  •  3
    intk replied

    Hello, i'll attach You the excel file this evening when i'll be back from work, thank You!

  •   intk replied privately
  • [deleted] replied

    Hi Intk,


    Some of your columns are just to big for column type VARCHAR and they are hitting size restriction. When I set column type to BLOB plugin creates table without problem. Problem is in efficiency of column types BLOB and Text because they are much slower then VARCHAR, but for this much data they are probably only options.

    For special characters you need to pay special attention about choosing Collation to be able to store and get special characters from database. We are using utf8_general_ci 


    Hope this helps, 

    Miljko Milosevic

    [email protected]

  •  3
    intk replied

    Hi, which is max limit accepted for VARCHAR type? if it be VARCHAR(700) i think it could be ok for my needs...

    If VARCHAR(700) exceed max limit accepted i ask: is it possible to load and create the table for first time with BLOB and in a second moment change it with VARCHAR(2000) for single frontend editing?

    And... there is a better type than BLOB for better performance? I think TEXT type for example... (i'm not expert for data types...). With assumption i need special character and utf-8 character Set.

    Ty

    This evening i'll do some tries...



  • [deleted] replied

    Hi,


    You can follow these to links to learn more about limits of column size in MySQL

    http://dev.mysql.com/doc/refman/5.7/en/string-type-overview.html

    http://dev.mysql.com/doc/refman/5.7/en/column-count-limit.html


    TEXT is better for your needs as BLOB is optimized for binary data saving and TEXT is for big strings. I used it as example to determinate that problem is in large amount of data.

    You can change from VARCHAR to TEXT to create big tables and then revert it in code for other tables. In my test with one of your excel files everything works normally 



    Hope this helps, 

    Miljko Milosevic

    [email protected]

  •  3
    intk replied

    ok it seems works good :)