format('Y-m-d H:i:s'); $UpdateDate=(date('Y-m-d H:i:s')); $days = Date('Y-m-d',strtotime($Gdates)); $cnt = 0; //QUERY TO DELETE THE TABLE INSIDE THE DATABASE //$fetch = mysql_query("SELECT * FROM schedule WHERE date(fStart)='$days'") or die(mysql_error()); //while($rows = mysql_fetch_array($fetch)){ //$update=mysql_query("UPDATE schedule SET `fStart`='$par',`fLastUpdate`='$UpdateDate',`fMeasurementID`='$seq',`fData`='$data',`fSourceKey`='$Source',`fMeasurementTypeKey`='$measure' WHERE fScheduleID = '".$rows['fSchecduleID']."' "); //mysql_query("DELETE FROM schedule WHERE date(fStart)='".$rows['fStart']."'"); mysql_query("INSERT INTO schedule VALUES('null','".$par."','".$UpdateDate."','".$seq."','','".$data."','".$Source."','".$measure."')"); //} //$delete = mysql_query("DELETE FROM `schedule` WHERE `fStart`='{$rows['fStart']}'"); //database query ?>