Dönen sonucu yazar mısınız?
<?php
ob_start();
require_once ('config.php');
$id = $_GET["id"];
$sorgu = $db->query("SELECT * FROM ayar WHERE id = $id");
print_r($db->errorInfo());
$al = $sorgu->fetch(PDO::FETCH_ASSOC);
print_r($al);
?>