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";
$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;
foreachmy$status('NEW','ASSIGNED','REOPENED'){
SendSQL("select count(bug_status) from bugs where bug_status='$status' and product='$product'");