Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Phpmyadimin values for VARCHAR

Posted on 2013-12-13
8
Medium Priority
?
287 Views
Last Modified: 2013-12-14
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
Comment
Question by:Rowby Goren
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 31

Expert Comment

by:Marco Gasi
ID: 39717104
As field type use TEXT instead of VARCHAR
0
 
LVL 31

Assisted Solution

by:Marco Gasi
Marco Gasi earned 668 total points
ID: 39717122
You should use TEXT for text messages and VARCHAR for strings such as username, password, addresses and so on...
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 668 total points
ID: 39717136
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
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 
LVL 111

Expert Comment

by:Ray Paseur
ID: 39717158
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
 
LVL 9

Author Comment

by:Rowby Goren
ID: 39717168
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
 
LVL 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 664 total points
ID: 39717207
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
 
LVL 9

Author Comment

by:Rowby Goren
ID: 39718952
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
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 39719002
Thanks for the points, ~Ray
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question