Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data type and default value

Status
Not open for further replies.

matanzas

Technical User
Apr 15, 2006
184
CA
If I want to set a default value if a field to 5 paragraphs of text (+/- 1,400 characters) do I make it a TEXT field?
I want a user to be able to log in, edit the field and log out saving his changes to his record so that the revised text is available to him the next time he logs in.

TIA
 
the purpose of a default value is to provide a value to the column for a row being inserted when you don't specifically provide a value for that column

if you're on 5.0.3 or later, you can use VARCHAR(400), otherwise you have to use TINYTEXT



r937.com | rudy.ca
 
Thanks, the hosting company is running ver 4.1.18
 
Sorry, I am new to this.
If I create the field "data" and give it a type "tinytext" and want to insert a default value that comes up the first time a user opens the page what's the proceedure.
At the moment the mysql manual is over my head.
thanks
 
DEFAULT values are values that are given to a column when the row being inserted specifically doesn't provide a value for that column -- but it only happens when the row is actually inserted

if you are talking about some value "that comes up the first time a user opens the page" that's a form field default value, and this question is best asked in one of the html forums

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top