开发者

Deleting with 3 verifiers

开发者 https://www.devze.com 2023-03-07 13:17 出处:网络
I need to delete something with 3 verification checks.how can i do it.Currently this is the way i am doing it:

I need to delete something with 3 verification checks. how can i do it. Currently this is the way i am doing it:

 mysql_query("DELETE FROM comments WHERE co开发者_高级运维mment_id='$comment' AND (
 p_id='$pid'
 for_w = '$z'");


What about:

"DELETE FROM comments WHERE comment_id='$comment' AND p_id='$pid' AND for_w = '$z'"


You're almost there:

 mysql_query("DELETE FROM comments WHERE comment_id='$comment' 
                                   AND p_id='$pid' 
                                   AND for_w = '$z'");


1 - You have to put AND between your second and third condition
2 - Remove ( after the first one:

mysql_query("DELETE FROM comments WHERE comment_id='$comment' AND
 p_id='$pid' AND
 for_w = '$z'");
0

精彩评论

暂无评论...
验证码 换一张
取 消