--- a/admin/importUNSPSC.php +++ b/admin/importUNSPSC.php @@ -1,5 +1,29 @@ prepare('select * from "UNSPSCcategories";'); +$unspscresult->execute(); +foreach ($unspscresult->fetchAll() as $row) { + $unspsc[$row['UNSPSC']] = $row['Title']; + +} +$catsresult = $conn->prepare('SELECT substr( "categoryUNSPSC"::text, 0, 2 ) as cat , SUM( "value" ) as value +FROM contractnotice +GROUP BY cat ;'); +echo "
$catName | ".$row['value']." |