Solved

what datatype i should take?

Posted on 2009-07-06
3
244 Views
Last Modified: 2012-05-07
when we take input type=text and in the database we have the datatype varchar , then we are able to access the value. if i take a textarea then what datatype i should take in the database??
0
Comment
Question by:designersx
  • 2
3 Comments
 
LVL 34

Expert Comment

by:Beverley Portlock
ID: 24784942
For a textarea use data type TEXT. This will allow you to have up to 64K of data in the field. If you need more than this then look at MEDIUMTEXT.

TEXT fields are not as indexable as VARCHAR fields.
0
 

Author Comment

by:designersx
ID: 24784993
thanks for the above post.

sir tell me 1 thing , in textarea can we write any amount of data??
if suppose i take datatype to be longtext then textarea would work or not?? please tell me
0
 
LVL 34

Accepted Solution

by:
Beverley Portlock earned 125 total points
ID: 24785068
"sir tell me 1 thing , in textarea can we write any amount of data??"

No. There are limits.

TEXT => 64K maximum
MEDIUMTEXT => 16M maximum
LONGTEXT => 2GB maximum

"if suppose i take datatype to be longtext then textarea would work or not?? please tell me"

It should work OK, but your PHP installation may have a POST limit of 8M (which is not uncommon). You can change this by checking php.ini and looking for POST_MAX_SIZE
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now