Solved

what datatype i should take?

Posted on 2009-07-06
3
246 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
xampp tool 12 48
error log using ftp 7 39
Curl & PHP Command Help 4 22
Attach to file (img) a unique id 8 24
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…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

776 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