Fixing PDO fetching

This commit is contained in:
2017-09-05 13:37:16 +07:00
parent f8f4398007
commit a4db3c8391
3 changed files with 111 additions and 117 deletions

View File

@@ -63,7 +63,7 @@ class Post extends \Core\Model
if ($query->execute([$id])) {
if ($query->rowCount() === 1) {
$result = $query->fetchAll(\PDO::FETCH_ASSOC);
$result = $query->fetch(\PDO::FETCH_ASSOC);
return $result;
}
}