tomjones2
28-04-06, 04:35 PM
hi people
this is the table i have created in mysql 4.1.9 running on php myadmin
create table diss_rec(
diss_num int(6) primary key auto_increment,
hemis_no int(6) not null unique,
dissertation_title char(200) not null,
author_surname char(50) not null,
author_initial char(1)not null,
year_of_sub int(4) not null,
course_code char(10) not null,
grade char(4) not null ,
abstract varchar(3000) not null,
ab_checked boolean not null default "false",
link_checked boolean not null default "false",
FOREIGN KEY (course_code) references course(course_code) ON UPDATE CASCADE ON DELETE RESTRICT,
FOREIGN KEY (year_of_sub) references years(year) ON UPDATE RESTRICT ON DELETE RESTRICT,
FOREIGN KEY (grade) references grade(grade) ON UPDATE RESTRICT ON DELETE RESTRICT
)TYPE = INNODB;
why can i put a enter more than 6 characters into the hemis_no attribute, i though by specifiy the length it stopped this happening
thankyou
this is the table i have created in mysql 4.1.9 running on php myadmin
create table diss_rec(
diss_num int(6) primary key auto_increment,
hemis_no int(6) not null unique,
dissertation_title char(200) not null,
author_surname char(50) not null,
author_initial char(1)not null,
year_of_sub int(4) not null,
course_code char(10) not null,
grade char(4) not null ,
abstract varchar(3000) not null,
ab_checked boolean not null default "false",
link_checked boolean not null default "false",
FOREIGN KEY (course_code) references course(course_code) ON UPDATE CASCADE ON DELETE RESTRICT,
FOREIGN KEY (year_of_sub) references years(year) ON UPDATE RESTRICT ON DELETE RESTRICT,
FOREIGN KEY (grade) references grade(grade) ON UPDATE RESTRICT ON DELETE RESTRICT
)TYPE = INNODB;
why can i put a enter more than 6 characters into the hemis_no attribute, i though by specifiy the length it stopped this happening
thankyou