changed return to bool on update and delete
This commit is contained in:
parent
e2bf38299b
commit
56a3e584e7
|
@ -147,9 +147,7 @@ class AddressRepository
|
|||
$statement->bindParam(param: 'zip', var: $zip);
|
||||
$statement->bindParam(param: 'city', var: $city);
|
||||
$statement->bindParam(param: 'phone', var: $phone);
|
||||
$statement->execute();
|
||||
|
||||
return $statement->rowCount();
|
||||
return $statement->execute();
|
||||
} catch (PDOException $e) {
|
||||
echo $e->getMessage();
|
||||
return false;
|
||||
|
@ -167,9 +165,7 @@ class AddressRepository
|
|||
$statement = $this->databaseConnection->getConnection()->prepare(query: $sql);
|
||||
$id = $addressBookEntry->getId();
|
||||
$statement->bindParam(param: 'id', var: $id);
|
||||
$statement->execute();
|
||||
|
||||
return $statement->rowCount();
|
||||
return $statement->execute();
|
||||
} catch (PDOException $e) {
|
||||
exit($e->getMessage());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue