From 2c7938a0c33bc1e80ce344eecec0dd9e8ad4f203 Mon Sep 17 00:00:00 2001 From: kj Date: Sun, 24 Jul 2022 00:29:34 -0400 Subject: [PATCH] Set default fetch mode to fetch assoc. --- src/Libs/Database.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Libs/Database.php b/src/Libs/Database.php index 2afddf1..1f0254e 100644 --- a/src/Libs/Database.php +++ b/src/Libs/Database.php @@ -39,6 +39,7 @@ class Database extends PDO { ); } self::$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + self::$db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC); } return self::$db; }