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: 'zip', var: $zip);
|
||||||
$statement->bindParam(param: 'city', var: $city);
|
$statement->bindParam(param: 'city', var: $city);
|
||||||
$statement->bindParam(param: 'phone', var: $phone);
|
$statement->bindParam(param: 'phone', var: $phone);
|
||||||
$statement->execute();
|
return $statement->execute();
|
||||||
|
|
||||||
return $statement->rowCount();
|
|
||||||
} catch (PDOException $e) {
|
} catch (PDOException $e) {
|
||||||
echo $e->getMessage();
|
echo $e->getMessage();
|
||||||
return false;
|
return false;
|
||||||
|
@ -167,9 +165,7 @@ class AddressRepository
|
||||||
$statement = $this->databaseConnection->getConnection()->prepare(query: $sql);
|
$statement = $this->databaseConnection->getConnection()->prepare(query: $sql);
|
||||||
$id = $addressBookEntry->getId();
|
$id = $addressBookEntry->getId();
|
||||||
$statement->bindParam(param: 'id', var: $id);
|
$statement->bindParam(param: 'id', var: $id);
|
||||||
$statement->execute();
|
return $statement->execute();
|
||||||
|
|
||||||
return $statement->rowCount();
|
|
||||||
} catch (PDOException $e) {
|
} catch (PDOException $e) {
|
||||||
exit($e->getMessage());
|
exit($e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue