public function deleteAddressBook($addressBookId)
    {
        $stmt = $this->pdo->prepare('DELETE FROM '.$this->cardsTableName.' WHERE addressbookid = ?');
        $stmt->execute([$addressBookId]);

        $stmt = $this->pdo->prepare('DELETE FROM '.$this->addressBooksTableName.' WHERE id = ?');
        $stmt->execute([$addressBookId]);

        $stmt = $this->pdo->prepare('DELETE FROM '.$this->addressBookChangesTableName.' WHERE addressbookid = ?');
        $stmt->execute([$addressBookId]);
    }
public function deleteAddressBook($addressBookId)
    {
        $stmt = $this->pdo->prepare('DELETE FROM '.$this->cardsTableName.' WHERE addressbookid = ?');
        $stmt->execute([$addressBookId]);

        $stmt = $this->pdo->prepare('DELETE FROM '.$this->addressBooksTableName.' WHERE id = ?');
        $stmt->execute([$addressBookId]);

        $stmt = $this->pdo->prepare('DELETE FROM '.$this->addressBookChangesTableName.' WHERE addressbookid = ?');
        $stmt->execute([$addressBookId]);
    }
public function deleteAddressBook ( $ addressBookId ) { $ stmt = $ this -> pdo -> prepare ( 'DELETE FROM ' . $ this -> cardsTableName . ' WHERE addressbookid = ?' ) ; $ stmt -> execute ( [ $ addressBookId ] ) ; $ stmt = $ this -> pdo -> prepare ( 'DELETE FROM ' . $ this -> addressBooksTableName . ' WHERE id = ?' ) ; $ stmt -> execute ( [ $ addressBookId ] ) ; $ stmt = $ this -> pdo -> prepare ( 'DELETE FROM ' . $ this -> addressBookChangesTableName . ' WHERE addressbookid = ?' ) ; $ stmt -> execute ( [ $ addressBookId ] ) ; }
Deletes an entire addressbook and all its contents.

@param int $addressBookId
Deletes an entire addressbook and all its contents .