$result=$sth->fetchAll(); if(count($result)){ $success='1'; $msg="Connection Removed"; $rnd_code= DataClass::generateRandomString(12); $sql="DELETE from connect where user_id2 IN (:uid2,:uid) and user_id1 IN (:uid,:uid2) and kid_id=:kid_id"; $sth=$conn->prepare($sql); $sth->bindValue("uid",$uid); $sth->bindValue("uid2",$uid2); $sth->bindValue('kid_id',$kid); try{$sth->execute();} catch(Exception $e){} $data= DataClass::get_connect_data($uid)? DataClass::get_connect_data($uid):[]; /*$sql="update grownup_alias set access=0 where user_id=:uid and kid_id IN (select connect.kid_id from connect where user_id2=:uid2 and user_id1=:uid UNION select connect.kid_id from connect where user_id2=:uid and user_id1=:uid2)"; $sth=$conn->prepare($sql); $sth->bindValue("uid",$uid); $sth->bindValue("uid2",$uid2); try{$sth->execute();} catch(Exception $e){}*/ //$data=DataClass::get_details($uid,$code); /*if($data){ $success='1'; $msg="Result Found"; } else{ $success='0';