count; ++$i) {
$id = sprintf("%d",$i);
if (!$wdb->exists($id)) continue;
$wine = $wdb->get($id);
if (!$wine->country) print "i=$i";
++$country[$wine->country];
++$year[$wine->year];
++$buy[$wine->buy];
++$color[$wine->color];
++$store[$wine->store];
if ($wine->price < 8)
++$price[8];
elseif ($wine->price < 12)
++$price[12];
elseif ($wine->price < 18)
++$price[18];
else
++$price[100];
++$count;
}
$wdb->close();
?>
Country
$key ($country[$key])\n",urlencode($key));
}
?>
Vintage
NV (%s)\n",$year['NV']);
$keys = array_keys($year);
sort($keys,SORT_NUMERIC);
foreach ($keys as $key) {
if ($key == 'NV') continue;
printf("- $key ($year[$key])\n",urlencode($key));
}
?>
Color
$key ($color[$key])\n",urlencode($key));
?>
Store
Unknown ($cnt)\n");
else
printf("- $key ($cnt)\n",urlencode($key));
}
?>