Selection
Inventory
\n";
$res = pg_query ("SELECT ".
' type,'.
' name,'.
' subtype,'.
' id,'.
' status,'.
' person,'.
' loc,'.
' remarks,'.
' CASE WHEN ncmts=0 THEN \'\' '.
' WHEN ncmts=1 THEN \'1 comment\' '.
' ELSE ncmts || \' comments\' '.
' END AS cmts '.
"FROM inventory ".
"WHERE type IN ('".implode("','", $showtypes)."')".
"ORDER BY $sortrow;");
#gate_show_result($res);
echo "\n";
$oe=0;
while ($row = pg_fetch_assoc($res)) {
echo '';
echo ''.strtoupper($row['type']).' | ';
echo ''.hrefname($row['name']).' | ';
echo ''.$row['subtype'].' | ';
echo ''.$row['id'].' | ';
echo ''.$row['status'].' | ';
echo ''.$row['person'].' | ';
echo ''.$row['loc'].' | ';
echo ''.$row['remarks'].' | ';
echo ''.$row['cmts'].' | ';
echo "
\n";
}
echo "\n";
#gate_close();
?>