setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = file_get_contents(__DIR__ . '/add_officer_types.sql'); $db->exec($sql); echo "SQL executed successfully.\n"; } catch (\PDOException $e) { echo "Error: " . $e->getMessage() . "\n"; }