Re: [MDB] updateDatabase(), 2 same fields in schema, not 2 same field in tables

From: Date: Thu, 21 Aug 2003 02:47:09 +0000
Subject: Re: [MDB] updateDatabase(), 2 same fields in schema, not 2 same field in tables
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-7320@lists.php.net to get a copy of this message
On Wed, Aug 20, 2003 at 10:38:38PM -0400, Thierry B. wrote: > After running the script that call updateDatabase() to create the database > on MySql, the rep_opt field is created as 'varchar(32)', whereas room_name > is created as 'char(25)'. Shouldn't they be the same mysql type? > > Thierry Bothorel I have no experience with MDB, but from a MySQL point of view that should not be possible. From the MySQL Manual: If any column in a table has a variable length, the entire row is variable-length as a result. Therefore, if a table contains any variable-length columns (VARCHAR, TEXT, or BLOB), all CHAR columns longer than three characters are changed to VARCHAR columns. This doesn't affect how you use the columns in any way; in MySQL, VARCHAR is just a different way to store characters. MySQL performs this conversion because it saves space and makes table operations faster. http://www.mysql.com/doc/en/Silent_column_changes.html -- Regards, Stefan Walk <swalk@prp.physik.tu-darmstadt.de>

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