$sqlz = mysql_query("select DISTINCT(DATE_FORMAT(checktime,'%d/%m/%Y' )) AS checktimes FROM checkinout
where checktime>='$date1' and checktime<='$date2' order by checktime asc ");
while ($rowz = mysql_fetch_array($sqlz)) {
$i++;
$waktus=$rowz['checktimes'];
$invoice_date = $waktus;
$temp1 = explode('/',$invoice_date);
$temp2 = mktime(0,0,0,$temp1[1],$temp1[0],$temp1[2]);
$pecahtanggal=date('Y-m-d',$temp2);
/////////////////////////////////////////////////////////
$queryas ="SELECT datediff('".$pecahtanggal."',CURDATE()) AS selisiha";
$datas=mysql_query($queryas);
while($bacas=mysql_fetch_array($datas)){
$selisiha= $bacas['selisiha'];
$xa = mktime (0 ,0 ,0 ,date("m") , date("d") +$selisiha, date("y"));
$harian=date ("l" , $xa );
$hariana=substr($harian,0,3);
Tidak ada komentar:
Posting Komentar