Okay
  Public Ticket #3705532
Change characters limit (255) in existing table column
Closed

Comments

  • whosred_sk started the conversation

    Hi, 

    I have created table with a data already in it (300 rows). In one of my column cant add more than 255 characters. I need to extended this option for more characters, but can not find this option (eiher to change from string to multi-string - in attachment) of change characters cont (only see this option when I add new column). Can you guide me pls how to fix this ? Thank you very much agan for great support.

    Attached files:  Screenshot 2024-08-15 at 10.10.20.png

  •  1,846
    Miloš replied

    Hello,

    We will advise how you can achieve this.

    Basically, at this moment, if you have already set that column to be a "one-line string" when it was created and you need to increase the character limit for it, there are two ways how you can do this :

    1. You can go to your database using something like PhPMyAdmin or any other DB management Tool:

    I will show you a guide how you can change the character limit of the column(s) in your Database directly, without losing any data from that Column :

     For example, if you got a Manual or SQL Query Table, you can do this :

    Enable editing for a moment and check this box, here you will see "MySQL table name for editing" :

    3853989226.png

    Then, in phpMyAdmin ( or any other Database Management Tool), go to your Database, find the table, click on the "columns", find the Column you need and go to "change" button :

    1558298457.png
    4383131363.png

    and change from VARCHAR to TEXT as shown.

    The differcence is - a column from VARCHAR type( which has a limitation of 255 characters) will change to TEXT type( 65,535 character limit) ,

    so then you can save the change and when you go back in our Plugin's table, you will be able to write any text you need in the cell.


    2. - Or another way ( this one is only for Manual Tables) - you can delete and recreate this column in the Manual wpDataTable and set it right away to be a "multi-line string", this way you will ensure that it has this much higher character limit when it gets set in the Database as "TEXT".

    5179224980.png

    Let me know how it goes, and if you need further assistance, please. Thanks.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    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