开发者

Deleting with 3 verifiers

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜