PHP expert |
|
CREATE TABLE category(
id int NOT NULL,
name VARCHAR(...) NOT NULL,
cat_id int NOT NULL,
PRIMARY KEY(id),
INDEX (cat_id),
FOREIGN KEY (cat_id)
REFERENCES category(id)
ON UPDATE CASCADE ON DELETE CASCADE);
CREATE TABLE category( id int NOT NULL, name VARCHAR(...) NOT NULL, cat_id int NOT NULL, PRIMARY KEY(id), INDEX (cat_id), FOREIGN KEY (cat_id) REFERENCES category(id) ON UPDATE CASCADE ON DELETE CASCADE);
Zo kan je oneindig diep gaan. |