include("head_href.php"); ?>
|
|
|
|
|
|
|
|
1. Average visitor per month |
|
$query_day="select count(*) as cnt, DAYNAME(wdate) as dnr, TO_DAYS(wdate) as tdr from site_stats where wdate>= DATE_SUB(CURRENT_date,interval 6 day) group by dnr,tdr order by cnt desc, tdr desc limit 1";
//echo "$query_day ";
$result_day=mysqli_query($connect, $query_day,$connect);
?>
2. The Busiest day of week |
for($m=0;$rows_day=mysqli_fetch_array($result_day);$m++){
echo " $rows_day[1] ";
} mysqli_free_result($result_day);
?>
|
$query_h="select count(tm) as tmr,tm from site_stats where wdate>= DATE_SUB(CURRENT_date,interval 24 HOUR) group by tm order by tmr desc;";
//echo $query_h;
$result_h=mysqli_query($connect, $query_h,$connect);
$rows_h=mysqli_fetch_array($result_h); mysqli_free_result($result_h);
if($rows_h[1]>12){ $busit_hour= "PM. "." ".(int)($rows_h[1]-12);
} else if($rows_h[1] == 12) { $busit_hour= "PM. 12";
}else{ $busit_hour= "AM. "." ".(int)$rows_h[1];
}
?>
3. The Busiest
Hours |
|
$time_stamp_ma=mktime()-5184000; //�δ�ġ ���. admin //�ﱸ�� ������� ����
//echo "$time_stamp_ma ";
$date_ma=getdate($time_stamp_ma);
if($date_ma[mon]<10){ $data_month="0"."$date_ma[mon]"; }else{ $data_month=$date_ma[mon] ; }
if($date_ma[mday]<10){ $data_day="0"."$date_ma[mday]"; }else{ $data_day=$date_ma[mday] ; }
$date_cf=$date_ma[year].$data_month.$data_day."000000";
$current_cf=date(Ymd)."000000";
//echo "$date_cf ";
//echo "$current_cf ";
$query_ma1="select count(anum),avg(auct_end-auct_start) from auct_master where (auction='2')&&(end_chk ='Y')&&(auct_start!='')&&(auct_end!='')&&(auct_end> '$date_cf')&&(auct_end<'$current_cf')"; //
$result_ma1=mysqli_query($connect, $query_ma1,$connect);
//echo $query_ma1;
$total_ma1=mysqli_fetch_array($result_ma1); mysqli_free_result($result_ma1);
$real_time=floor($total_ma1[1]/10000);
//echo $real_time;
$real_time0=substr($real_time,0,2);
//echo $real_time0;
$real_time1=substr($real_time,2,2);
// ex, 1330 --> 13day 30hour
$real_day0=$real_time0; //original day
$real_day1=floor($real_time1/24); //remain day
$real_day=$real_day0 + $real_day1;
$real_hour=floor($real_time%24); //remain hour of one day
?>
4. Average time
to sell |
echo "$real_day Day $real_hour Hours";?>
|
|
|
|
|
|
|
|
|
|
|