public function delete($id1, $id2) { if (empty(self::$conn)) { self::$conn = $this->connectPdo(); } $sql = "DELETE FROM friend WHERE user_id1=12 and user_id2=11"; $stmt = self::$conn->prepare($sql); //$stmt->bindParam(1,$id1); //$stmt->bindParam(2,$id2); if ($stmt->execute()) { return true; } else { return false; } }