Dependent dropdown menu problem
I have 3 dependent dropdown menues setup in dreamweaver that gets their data from a MySQL Table.
When I use dreamweaver ot control the dropdown they work fine, but the data being fed into my db is the numeric value used to control the dropdown not the label. If I change the value of the dropdown in dreamweaver to the lable the dropdown arent dependent anymore.
I heard that I have to set Foreign Keys to fix this.
I would apreciate any help I can get.
My first table is province:
CREATE TABLE `db`.`province` (
`id_prov` INTEGER UNSIGNED NOT NULL DEFAULT NULL AUTO_INCREMENT,
`name_prov` VARCHAR(45) NOT NULL,
PRIMARY KEY (`id_prov`)
)
ENGINE = InnoDB;
Second is City:
CREATE TABLE `db`.`city` (
`id_city` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`idprov_city` INTEGER UNSIGNED NOT NULL,
`name_city` VARCHAR(65) NOT NULL,
PRIMARY KEY (`id_city`)
)
ENGINE = InnoDB;
Third is Suburb:
CREATE TABLE `db`.`suburb` (
`id_suburb` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`idprov_suburb` INTEGER UNSIGNED NOT NULL,
`idcity_suburb` INTEGER UNSIGNED NOT NULL,
`name_suburb` VARCHAR(255) NOT NULL,
PRIMARY KEY (`id_suburb`)
)
ENGINE = InnoDB;
