RE: [PEAR] regarding VARCHAR and CHAR

From: Date: Wed, 16 Oct 2002 13:38:00 +0000
Subject: RE: [PEAR] regarding VARCHAR and CHAR
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-2505@lists.php.net to get a copy of this message
Actually, not really. The use of VARCHAR and CHAR in MySQL is strictly defined, and quite easy to understand. If an entire table is fixed width, then MySQL will use CHAR unless you tell it to use VARCHAR. However, if you have a BLOB, TEXT, or VARCHAR field, then MySQL will use VARCHAR over CHAR, because the benefits of using a fixed length field in MySQL don't exist anymore. There are benefits to both CHAR and VARCHAR, you just have to know when to use them and why. This is not to imply you didn't already know that, just to clarify any potential misunderstandings. Jason Lotito PHP Developer's Network Founder www.DevNetwork.net www.PHPComplete.com > -----Original Message----- > From: Lukas Smith [mailto:smith@dybnet.de] > Sent: Wednesday, October 16, 2002 6:49 AM > To: pear-general@lists.php.net > Subject: [PEAR] regarding VARCHAR and CHAR > > > Hi, > > As this issue popped up in the LiveUser development: > I just wanted to tell you guys that you can define what you want in > MySQL: CHAR or VARCHAR .. MySQL does what it wants anyways: > http://www.mysql.com/doc/en/Silent_column_changes.html Therefore I will leave things in MDB as they are: The MySQL driver creates fields as CHAR regards, Lukas Smith smith@dybnet.de _______________________________ DybNet Internet Solutions GbR Reuchlinstr. 10-11 Gebäude 4 1.OG Raum 6 (4.1.6) 10553 Berlin Germany Tel. : +49 30 83 22 50 00 Fax : +49 30 83 22 50 07 www.dybnet.de info@dybnet.de -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.pear.general (#2505) next »