// 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;
回报:
{
"categories": {
"name": "life"
}
}
这只是 bolt_taxonomy 表中与上述条件匹配的第一个条目。我怎样才能让它返回整个类别列表?