// Includes the left menu on the left
include("../include/left_menu.php");
?>
if(isset($box_mode) == false || $box_mode != 'wo') {
?>
Community > Site Stats > Success Rate
}
?>
include("head_href.php"); ?>
Total Success Rate
0 %
(/)
$category_qry = "SELECT * FROM category WHERE catedep=1";
$category_res = mysqli_query($connect, $category_qry,$connect);
$category_tot = mysqli_num_rows($category_res);
if($category_tot) {
for($c=0;$c<$category_tot;$c++) {
$category_row = "";
$category_last_no = "";
$sub_auct_tot_qry = "";
$sub_auct_tot_res = "";
$sub_auct_tot = "";
$sub_success_tot_qry = "";
$sub_success_tot_res = "";
$sub_success_tot = "";
$sub_success_rate = "";
$category_row = mysqli_fetch_array($category_res);
$category_last_no = $category_row[catenum] + 999999;
$sub_auct_tot_qry = mysqli_query($connect, "SELECT COUNT(anum) FROM auct_master WHERE auction='2' AND (catenum BETWEEN $category_row[catenum] AND $category_last_no);",$connect);
$sub_auct_tot = mysql_result($sub_auct_tot_qry,0,0);
$sub_success_qry = "SELECT * FROM auct_master LEFT OUTER JOIN auct_bid_result USING(anum) WHERE auct_master.anum=auct_bid_result.anum AND catenum BETWEEN $category_row[catenum] AND $category_last_no GROUP BY auct_bid_result.anum";
$sub_success_res = mysqli_query($connect, $sub_success_qry,$connect);
$sub_success_tot = mysqli_num_rows($sub_success_res);
if($sub_auct_tot) {
$sub_success_rate = ($sub_success_tot/$sub_auct_tot) * 100;
$sub_success_rate = round($sub_success_rate,1);
$sub_success_rate .= " %";
} else {
$sub_success_rate = "N/A";
}
echo("
$category_row[catename]
$sub_success_rate
($sub_success_tot/$sub_auct_tot)
");
}
}
?>
////print_r($_REQUEST);
include "../include/footer.php";
?>