• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 289
  • Last Modified:

Phpmyadimin values for VARCHAR

Hello!

I am using phpmyadmin with a mysql database.

I've added a row to a table and it's for a text field.   I want the field to hold a reasonable amount of text.  For example a "big" paragraph.    Is the most number of characters I can add is 255?  Or can I double that amount just to make sure there is plenty of room for a nice big paragraph to be added.  Or even 4 times that amount.    For example this paragraph has about 370 Characters.  

The main thing is once I set up this field I don't want to have to go back in and increase it later.
 
Thanks

Rowby
0
Rowby Goren
Asked:
Rowby Goren
  • 3
  • 2
  • 2
  • +1
3 Solutions
 
Marco GasiFreelancerCommented:
As field type use TEXT instead of VARCHAR
0
 
Marco GasiFreelancerCommented:
You should use TEXT for text messages and VARCHAR for strings such as username, password, addresses and so on...
0
 
COBOLdinosaurCommented:
The maximum length for varchar is 255 up to mysql version 5.0.3 for versions higher than 5.0.3 have a maximun of 64k however the 64k limit is also the limit for row length so you need to keep that in mind if you have very large rows.

Varchar is slightly more efficient than text at a type because of the additional overhead to store text variables.

Cd&
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Ray PaseurCommented:
Some versions of SQL have deprecated TEXT.  I think I would probably use VARCHAR.

Man page here:
http://dev.mysql.com/doc/refman/5.5/en/char.html
0
 
Rowby GorenAuthor Commented:
Thanks Cd&

The mysql version is "5.0.95-log"  

What would I put in the character field to have it more than 255 characters.  Let's say 1000 characters max.

Also, for a different field, is is there something I would do in phpmyadmin to the column to activate the tinymce editor?  In the dropdown I see various "tiny"'s    but no tinymce.

Rowby
0
 
Ray PaseurCommented:
Hey, Rowby.  I haven't seen the TinyMCE editor integrated into phpMyAdmin.  I expect you could just use VARCHAR(1000) for the column definition and use copy/paste to get the information into the column.  If you copy/paste from MSFT Word, you may want to read this article:
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_11880-Unicode-PHP-and-Character-Collisions.html

See the parts about "UTF-8 in Microsoft Applications" and "Copy-and-Paste From Microsoft Word."
0
 
Rowby GorenAuthor Commented:
Hi

I went ahead and used varchar  And as it turned out I don't need to include the TInyMce editor, in this case.

Thanks all!
0
 
Ray PaseurCommented:
Thanks for the points, ~Ray
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now