Index: /schedule/Transaction/insert.php
===================================================================
--- /schedule/Transaction/insert.php	(revision 16040)
+++ /schedule/Transaction/insert.php	(revision 16041)
@@ -23,21 +23,71 @@
 $measure = explode(",",$SelectedMeasure);
 echo "<br />";
+$temp = "";
+$insert_count = 0;
+
+
+
+/////// for measurement id///////		
+$new_limit = $limtex;
+						for($j=0;$j<=$new_limit-1;$j++){
+
+							$Timef = $Time[$i];
+							
+							$ex_counter = explode(":",$Timef);
+							$ex_counter2 = explode(" ",$ex_counter[1]);
+							
+							$counter[$j] = $ex_counter[0]." ".$ex_counter2[1];
+									
+						}
+									
+						if($new_limit > 1){
+							for($j=0;$j<=$new_limit-1;$j++){		
+									
+								for($y=0;$y<=$new_limit-1;$y++){
+									
+									if($counter[$j]==$counter[$y+1]){
+									
+										if(empty($by_count[$j])){
+									
+											$by_count[$j] = $y;
+										}
+									}
+									
+								}
+							}	
+									
+						}else{
+									
+									
+							$by_count[0]=0;
+									
+						}
+					
+
+					
+					
+					
+
 for($i=0;$i<=$limtex-1;$i++){
 
-	
 						$n1 = $n_value[$i];
+						$select[$i];
+						$selectf = $select[$i];
+				//////Time////
+				$Timef = $Time[$i];
+						
+				//////// for measurement /////////
+						
+						$measuref = $measure[$i];
+
+				//////// Date parsing into format////////
+						$dateTime=new DateTime($date." ".$Time[$i]);
+						$parsed_date =  $dateTime->format('Y-m-d H:i:s');
+						
+						echo $by_count[$i]."----".$counter[$j];
+						echo "<br />";
+						
 			
-						$select[$i];
-	
-	
-						$selectf = $select[$i];
-						$Timef = $Time[$i];
-						$dateTime=new DateTime($date." ".$Time[$i]);
-						
-						echo $parsed_date =  $dateTime->format('Y-m-d H:i:s');
-						$measuref = $measure[$i];
-		
-			
-		$insert = mysql_query("INSERT INTO schedule values('','$parsed_date','$parsed_date','','','$n1','$selectf','$measuref')") or die(mysql_error());
+		//$insert = mysql_query("INSERT INTO schedule values('','$parsed_date','$parsed_date','','','$n1','$selectf','$measuref')") or die(mysql_error());
 				
 }
