Where is the Error?
DELETE FROM postagens WHERE id='$p_id' AND u_id='$u_id' SET FOREIGN_KEY_CHECKS = 0;
Clarifications:
p_id = post id (primary key)
u_id = user id (foreign key)
Where is the Error?
DELETE FROM postagens WHERE id='$p_id' AND u_id='$u_id' SET FOREIGN_KEY_CHECKS = 0;
Clarifications:
p_id = post id (primary key)
u_id = user id (foreign key)
I believe you should first run SET FOREIGN_KEY_CHECKS=0;
and then DELETE FROM ...;
. Both with their respective ;
since they are distinct commands.