// Get all categories
$query = "SELECT name FROM bolt_taxonomy WHERE taxonomytype = :taxonomytype AND contenttype = :contenttype";
$map = array(
':taxonomytype' => 'categories',
':contenttype' => 'news',
);
$categories = $this->app['db']->fetchAssoc($query, $map);
$response = $this->app->json(array('categories' => $categories));
return $response;
Returns:
{
"categories": {
"name": "life"
}
}
Which is just the first entry that matches the above condition on the bolt_taxonomy table. How can I get it to return the whole list of categories?