Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $commentDeleteResultSet=[];
- $row_id=filter_var($_POST['idRecord'],FILTER_SANITIZE_NUMBER_INT);
- $deleteCommentQuery = $db_con->prepare("DELETE FROM tbl_comment WHERE user_id=:usr_id AND row_id=:idRecord");
- $deleteCommentQuery->bindParam(":usr_id",$user_id);
- $deleteCommentQuery->bindParam(":idRecord",$row_id);
- $deleteCommentQuery->execute();
- if($deleteCommentQuery->rowCount()>0){
- $commentDeleteResultSet['success']=false;
- $commentDeleteResultSet['error_msg']="cancellazione commento fallita";
- echo json_encode($commentDeleteResultSet);
- exit;
- }else{
- $commentDeleteResultSet['success']=true;
- $commentDeleteResultSet['success_msg']="cancellazione commento riuscita";
- var_dump($deleteCommentQuery->rowCount());
- echo json_encode($commentDeleteResultSet);
- exit;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement