Fix database table name

This commit is contained in:
antonkomarev
2020-07-12 19:41:23 +03:00
parent 6b2b0a0f81
commit c1d0a540ed

View File

@@ -29,7 +29,7 @@ final class CounterDatabaseRepository implements CounterRepositoryInterface
{
$statement = $this->connection->prepare(
'SELECT COUNT(*)
FROM page_views
FROM github_profile_views
WHERE username = :username;'
);
$statement->bindParam('username', $username);
@@ -41,7 +41,7 @@ final class CounterDatabaseRepository implements CounterRepositoryInterface
public function incrementCountByUsername(string $username): void
{
$statement = $this->connection->prepare(
'INSERT INTO page_views
'INSERT INTO github_profile_views
(username, created_at)
VALUES (:username, NOW());'
);