čau visiem,
man te izveidojās diskusija vai ir vērts lietot MySQL foreign keys.
Piem:
TABLE - galleries
ID(PRIMARY)
TITLE
TABLE - pictures
ID(PRIMARY)
PATH
GALLERIES_ID(FK) ON UPDATE CASCADE, ON DELETE CASCADE
Kolēģis teica, ka MySQL nevajagot lietot jo baigi spiež uz performanci.
Bet, kas ir `labāk`?
bez FK: delete from pictures where gallery=ID;delete from galleries where id=ID
ar FK: delete from galleries where id=ID