Jump to content

[SOLVED] Need help to edit MySQL table.


Recommended Posts

I have a table called 'custom fields'.

In this table I have cust_id, cust_adtype, cust_fieldtype, cust_title.

 

cust_fieldtype is a TEXTAREA with a value of VARCHAR(40).  I want to change it to VARCHAR(100).

 

Can someone tell my how to do that in mu cpanel?

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/74609-solved-need-help-to-edit-mysql-table/
Share on other sites

Thank you very much, however, can you give me an example?  I'm not up on MySQL.

 

This is an excerpt from the .sql file used to set up all of the tables.

This is the section of the .sql file that sets up the customfields table.

 

--------------------------------------------------------------------

 

CREATE TABLE `customfields` (

  `cust_id` int(11) NOT NULL auto_increment,

  `cust_adtype_id` int(11) NOT NULL default '0',

  `cust_field_type` varchar(40) NOT NULL default '',    <-----  This is what I need to change!

  `cust_order` int(11) NOT NULL default '0',

  `cust_title` varchar(20) NOT NULL default '',

  `cust_include_search` tinyint(1) NOT NULL default '0',

  `cust_include_search_results` tinyint(1) NOT NULL default '0',

  PRIMARY KEY  (`cust_id`)

) TYPE=InnoDB;

 

---------------------------------------------------------------------

 

How would I use the ALTERTABLE in this instance?

 

Your help is very much appreciated.

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.