(bug_status='NEW' or bug_status='ASSIGNED' or bug_status='REOPENED')
and product='$product' group by bug_status
FIN
$product=~s/\//-/gs;
my$file=join'/',$dir,$product;
my$exists=-f$file;
if(openDATA,">>$file")
{
SendSQL($query);
my%count;
pushmy@row,&today;
while(my@n=FetchSQLData())
{
push@row,@n;
}
if(!$exists)
{
printDATA<<FIN;
my$query="select count(bug_status) from bugs where (bug_status='NEW' or bug_status='ASSIGNED' or bug_status='REOPENED') and product='$product' group by bug_status";