PDO FetchAssoc not filtering ((solved))


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?

require 'scripts/start.php';
$pages = $db->query("SELECT department FROM content WHERE department='Art'

  require VIEW_ROOT . '/artpages.php';

this should help:

but if you still have problems then please report back to us. Helping each other is a good thing.