mysql - How to make foreign key update based on parent -


i have 2 tables, , i've made relation using designer between id column of first table user_id column of second table. , how add code or when, example, parent (id) deleted, user_id values correspond deleted id deleted? tried deleting 1 of registered ids, corresponding rows in child table didn't deleted.

i've done searching, i'm still confused.

thank you.

note: i'm experimenting mysql , php, , little blog i'm making.

please add on delete referential action foreign key constraint.

more details found here: https://dev.mysql.com/doc/refman/5.6/en/create-table-foreign-keys.html

for case, on delete cascade should fine.


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -