I am working on this script to fetch data from my column=Department with values=Arts. But when I display it all entries are still present, it isn’t fetching only the ones that matches my SELECT. Can you explain where I went wrong?
<?php
require 'scripts/start.php';
$pages = $db->query("SELECT department FROM content WHERE department='Art'
")->fetch(PDO::FETCH_ASSOC);
require VIEW_ROOT . '/artpages.php';
?>