PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > mysql.general > Limiting the text size on text fields
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Limiting the text size on text fields

Réponse
 
LinkBack Outils de la discussion
Vieux 15/10/2007, 15h27   #1
Ganesh's screen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Limiting the text size on text fields


Is there a way to restrict the length of text field in MySQL. For example, it
is of 65K limit and could hold more than 20000 characters. Is there a way to
restrict that to 4000 characters at table/field level. Coz the
max_allowed_packet constrainted the entire DB.

Thanks
Ganesh
--
View this message in context: http://www.nabble.com/Limiting-the-t...html#a13213842
Sent from the MySQL - General mailing list archive at Nabble.com.

  Réponse avec citation
Vieux 18/10/2007, 10h44   #2
Sebastian Mendel
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Limiting the text size on text fields

Ganesh's screen schrieb:
> Is there a way to restrict the length of text field in MySQL. For example, it
> is of 65K limit and could hold more than 20000 characters. Is there a way to
> restrict that to 4000 characters at table/field level. Coz the
> max_allowed_packet constrainted the entire DB.


you can specify the maximum length only on these field types:

CHAR(length)
VARCHAR(length)
BINARY(length)
VARBINARY(length)

--
Sebastian

  Réponse avec citation
Vieux 18/10/2007, 14h31   #3
Ganesh's screen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Limiting the text size on text fields


Thank you, Sebastian. Also does the usage of UTF-8 over Latin1 restraints the
usage or extensibility?


Sebastian Mendel wrote:
>
> Ganesh's screen schrieb:
>> Is there a way to restrict the length of text field in MySQL. For
>> example, it
>> is of 65K limit and could hold more than 20000 characters. Is there a way
>> to
>> restrict that to 4000 characters at table/field level. Coz the
>> max_allowed_packet constrainted the entire DB.

>
> you can specify the maximum length only on these field types:
>
> CHAR(length)
> VARCHAR(length)
> BINARY(length)
> VARBINARY(length)
>
> --
> Sebastian
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=lists@nabble.com
>
>
>


--
View this message in context: http://www.nabble.com/Limiting-the-t...html#a13273514
Sent from the MySQL - General mailing list archive at Nabble.com.

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 13h17.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08339 seconds with 11 queries