Calculated on the one month of today function Last_month_today ($time) { $last _month_time = mktime (Date ("G", $time), date ("I", $time), date ("s", $time), date ("n", $time), 0, date ("Y", $time)); $last _month_t = Date ("T", $last _month_time); if ($last _month_t < date ("J", $time)) { Return Date ("Y-m-t h:i:s", $last _month_time); } Return Date (date ("Y-m", $last _month_time). "-D", $time); } ?> Include DirName (DirName (dirname (__file__)). ' /config.php '; $endDate = Date (' y-m-d '); $date = Strtotime ($endDate); $beginDate = Last_month_today ($date); Query the total number of data bars for the last one months $sql = ' SELECT count (*) from Newpro where P_date>\ '. $beginDate. ' \ ' and p_date<\ '. $endDate. ' \''; $sql = "SELECT count (*) from Newpro where p_date> ' $beginDate ' and P_date < ' $endDate '";//This statement can also $d = db ()->query ($sql)->fetch (pdo::fetch_num); echo "Total number of data bars:". $d [0]; Number of data bars passed by the query audit $sql 2= $sql. ' and Is_pa_check_first=1 and is_pa_check_second=1 and Is_pa_check_third=1 '; $d 2 = db ()->query ($sql 2)->fetch (pdo::fetch_num); echo "Number of data bars approved:". $d 2[0]; Query the number of passes for an audit $sql 3= $sql. ' and Is_pa_check_first=1 '; $d 3 = db ()->query ($sql 3)->fetch (pdo::fetch_num); Check the number of passes for two audits $sql 4= $sql. ' and is_pa_check_first=1 and is_pa_check_second=1 '; $d 4 = db ()->query ($sql 4)->fetch (pdo::fetch_num); ?>
|
"> |
"> |
"> |
Total |
First Instance passed |
Second-Instance Adoption |
Audit through |
|