-2
Where is the Error?
DELETE FROM postagens WHERE id='$p_id' AND u_id='$u_id' SET FOREIGN_KEY_CHECKS = 0;
Clarifications:
p_id = id of posts(primary key)
u_id = user id(foreign key)
-2
Where is the Error?
DELETE FROM postagens WHERE id='$p_id' AND u_id='$u_id' SET FOREIGN_KEY_CHECKS = 0;
Clarifications:
p_id = id of posts(primary key)
u_id = user id(foreign key)
-1
I believe you must first execute the SET FOREIGN_KEY_CHECKS=0;
and then the DELETE FROM ...;
. Both with their respective ;
since they are separate commands.
Browser other questions tagged php mysql sql mysqli
You are not signed in. Login or sign up in order to post.
What error message reported by PHP and/or Mysql?
– Giovanni Nunes
No error, however is returning -1 affected lines! $Comm = "SET FOREIGN_KEY_CHECKS = 0; DELETE * FROM posts WHERE id='$p_id' AND u_id='$u_id'; SET FOREIGN_KEY_CHECKS = 1;";
– Danrley Fernandes Lopes
Place this inside a Try catch and edit your reply by placing the error message that occurs
– Thyago Dias