List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:February 27 2003 12:56pm
Subject:Re: is there a better way to store comments in mysql table?
View as plain text  
At 20:43 -0600 2/26/03, Paul DuBois wrote:
>At 21:32 -0500 2/26/03, Jianping Zhu wrote:
>>I have a guest book which have three fields.
>>user name
>>email
>>comments
>>
>>I want to mysql to store the information, but commnet maybe very long, is
>>there a better way to handle it instead of set a varchar(2000) or more for
>>a field comment in the table?
>
>VARCHAR has a maximum length of 2000.  In MySQL 4.1, it will be converted
>automatically to TEXT.  But you can use TEXT in any version of MySQL.
>Is that suitable for what you want?

Replying to myself here.  Sometimes it's best to engage the brain before
replying:

VARCHAR has a maximum length of *255*, not 2000.  If you declare a
VARCHAR with a longer length, it is converted to an appropriate TEXT
type in MySQL 4.1. Prior to 4.1, you get an error.

Thread
what is the best way to check if primary key exists?Jianping Zhu20 Feb
  • Re: what is the best way to check if primary key exists?1LT John W. Holmes20 Feb
    • where shoud i put sql scriptJianping Zhu27 Feb
      • is there a better way to store comments in mysql table?Jianping Zhu27 Feb
  • Re: what is the best way to check if primary key exists?Roger Baklund20 Feb
Re: where shoud i put sql scriptPaul DuBois27 Feb
  • mysql encripted password from perlJianping Zhu28 Feb
    • Re: mysql encripted password from perlJianping Zhu28 Feb
      • Re: mysql encripted password from perlJeff Kilbride1 Mar
        • Can't load data infile ...says :" ...(Using password: YES)"Cl. Yuri Huitron Alvarado1 Mar
          • Re: Can't load data infile ...says :" ...(Using password: YES)"Paul DuBois1 Mar
    • Re: mysql encripted password from perlKH Chiu1 Mar
      • List commandsLda Dominio2 Mar
        • RE: mysql not replicatingDan Rossi2 Mar
Re: is there a better way to store comments in mysql table?Paul DuBois27 Feb
  • Re: is there a better way to store comments in mysql table?Jianping Zhu27 Feb
  • Re: is there a better way to store comments in mysql table?Paul DuBois27 Feb
Re: is there a better way to store comments in mysql table?Paul DuBois27 Feb