try doing this
if(mysql_query($query,$dblink)==false){
echo mysql_error();
exit();
}
see what the error says. it should help you narrow it down.
also here are a few tables i have created using InnoDB. They have a foreign key constrant and I know it works. it might help
$dbquery='CREATE TABLE '.TABLE_TEMPTYPES.' (
id VARCHAR(20) NOT NULL,
title VARCHAR(254) NOT NULL,
PRIMARY KEY (id)) TYPE = InnoDB;';
$dbquery='CREATE TABLE '.TABLE_TEMPLATES.' (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
title VARCHAR(100) NOT NULL,
template LONGTEXT,
typeid VARCHAR(20) NOT NULL,
PRIMARY KEY (id),
INDEX (typeid),
FOREIGN KEY (typeid) REFERENCES '.TABLE_TEMPTYPES.'(id) ON DELETE RESTRICT ON UPDATE CASCADE) TYPE = InnoDB;';
$dbquery='CREATE TABLE '.TABLE_EVENTS.' (
id INT UNSIGNED NOT NULL auto_increment,
title VARCHAR(254),
edate CHAR(8),
etext TEXT,
templateid INT UNSIGNED,
PRIMARY KEY (id),
INDEX (templateid),
FOREIGN KEY (templateid) REFERENCES '.TABLE_TEMPLATES.'(id) ON DELETE RESTRICT ON UPDATE CASCADE) TYPE = InnoDB;';