Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2009
    Posts
    1
    Plugin Contributions
    0

    database error change products_options_values_name to text type from varchar

    Hi,

    I am displaying my attribute as a list with radio buttons but I would like to be able to add longer descriptions of each attribute.

    I tried changing the field type in the database but I get this error

    SQL query:

    ALTER TABLE `products_options_values` CHANGE `products_options_values_name` `products_options_values_name` TEXT CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL

    MySQL said:

    #1170 - BLOB/TEXT column 'products_options_values_name' used in key specification without a key length

    Does anyone know how I could change this?

    Thank you

    Rachael

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: change products_options_values_name to text type from varchar

    TEXT is a VERY LONG data type. Why are you choosing TEXT? Are you planning to write a book for each radio button? That sounds like it would be confusing navigation for the customer. Plus, TEXT takes up a lot more database space even for blank entries than a varchar field does.


    If you're going to use TEXT as a field type, then any indexes set for that field need to be adjusted to state how many letters it should use from that field when building the indexes. Making that number too long (ie: more than 10 or so) will make your database indexes become HUGE and will slow down performance. The error message you got is a direct result of trying to change a field, which already has an index set on it, to a type which requires also changing and rebuilding the index.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. v150 Changing Category_ID to VARCHAR
    By tharrison in forum General Questions
    Replies: 4
    Last Post: 18 Feb 2012, 05:56 AM
  2. Text attrib not completing products_options_values_name value
    By fozzyo in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 13 Dec 2011, 01:07 PM
  3. Change Product type from general to free shipping
    By turbosocks in forum Setting Up Categories, Products, Attributes
    Replies: 11
    Last Post: 17 Sep 2010, 06:27 AM
  4. Product Type cloned from General Type
    By mhfein in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 8 Jan 2009, 04:37 PM
  5. removing rate type text from shipping method page
    By feolindo in forum Basic Configuration
    Replies: 3
    Last Post: 21 Nov 2008, 06:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg