This commit is contained in:
Michał Sieciechowicz 2021-02-27 10:10:52 +01:00
parent c9a3948a98
commit 2414d4e780
1 changed files with 4 additions and 1 deletions

View File

@ -18,7 +18,10 @@ class ConnectionManager {
public static function Query(string $query, $params, $output = 'stdObject') {
$stmt = self::$connection->prepare($query);
$stmt->execute($params);
return $stmt->fetchObject($output);
$stmt->setFetchMode(PDO::FETCH_CLASS|PDO::FETCH_PROPS_LATE, $output);
return $stmt->fetch();
}
}
abstract class BaseModel {