API::Item()->get([ 'countOutput' => true, 'sortfield' => ['itemid'] ]);
pg_query(): Query failed: ERROR: column "i.itemid" must appear in the GROUP BY clause or be used in an aggregate function LINE 1: ...ems i WHERE i.type<>9 AND i.flags IN (0,4) ORDER BY i.itemid ^ [hosts.php:117 ? CFrontendApiWrapper->get() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CItem->get() ? DBselect() ? pg_query() in include/db.inc.php:395]
Error in query [SELECT COUNT(DISTINCT i.itemid) AS rowscount FROM items i WHERE i.type<>9 AND i.flags IN (0,4) ORDER BY i.itemid] [ERROR: column "i.itemid" must appear in the GROUP BY clause or be used in an aggregate function LINE 1: ...ems i WHERE i.type<>9 AND i.flags IN (0,4) ORDER BY i.itemid ^]