hii friends

i am trying to create a table name fulldetails with foreign key(jobcode) for that alredy i created a primary key(jobcode) table name jobs. while running that code am getting error message like Can't create table 'goget.fulldetails' (errno: 150). i couldn't find the error in my code. please let me know the mistake in that code......

my code:
mysql_connect('localhost', 'root', '');
$sql="create table fulldetails(sno INT NOT NULL AUTO_INCREMENT,keyword VARCAR(30) NOT NULL,companyname VARCAR(30) NOT NULL,role VARCAR(30) NOT NULL,experience VARCAR(20) NOT NUL,aboutcompany VARCAR(300) NOT NULL,responsibilities VARCAR(30) NOT NULL,keyskills VARCAR(30) NOT NULL,jobcode VARCAR(10) NOT NULL,FOREIGN KEY (jobcode) REFERENCES jobs(jobcode))";
die ("hello<br/>".mysql_error());