Re: FN-FORUM another simple mysql problem
date posted 27th April 2001 22:45
Just to expand on what Chris said, this is how your first table could end up.
create table members(
mem_no int(11) primary key not null uato_increment,
name varchar(30),
address1 varchar(50),
address2 varchar(50),
address3 varchar(50),
postcode varchar(10),
tel_no varchar(20),
emerg_name varchar(20),
emerg_no varchar(20),
email varchar(40),
last_use date,
notes tinytext);
The reason for using varchar in replace of char (just incase you didn`t know)
is that varchar will only store what is passed to it where as char will store
the data and leave the remaining as white space.
So passing Ade to a char of 20 would be stored as: 'Ade '
Pass the same to a varchar it will store as: 'Ade'
Thus saving space.
Just a little more depth, you might want to consider signing up to the MySQL
list, very good for problem solving such as this.
Ade