Changeset 16041 for schedule


Ignore:
Timestamp:
05/22/13 19:00:56 (12 years ago)
Author:
tanio
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified schedule/Transaction/insert.php ΒΆ

    r16007 r16041  
    2323$measure = explode(",",$SelectedMeasure);
    2424echo "<br />";
     25$temp = "";
     26$insert_count = 0;
     27
     28
     29
     30/////// for measurement id///////               
     31$new_limit = $limtex;
     32                                                for($j=0;$j<=$new_limit-1;$j++){
     33
     34                                                        $Timef = $Time[$i];
     35                                                       
     36                                                        $ex_counter = explode(":",$Timef);
     37                                                        $ex_counter2 = explode(" ",$ex_counter[1]);
     38                                                       
     39                                                        $counter[$j] = $ex_counter[0]." ".$ex_counter2[1];
     40                                                                       
     41                                                }
     42                                                                       
     43                                                if($new_limit > 1){
     44                                                        for($j=0;$j<=$new_limit-1;$j++){               
     45                                                                       
     46                                                                for($y=0;$y<=$new_limit-1;$y++){
     47                                                                       
     48                                                                        if($counter[$j]==$counter[$y+1]){
     49                                                                       
     50                                                                                if(empty($by_count[$j])){
     51                                                                       
     52                                                                                        $by_count[$j] = $y;
     53                                                                                }
     54                                                                        }
     55                                                                       
     56                                                                }
     57                                                        }       
     58                                                                       
     59                                                }else{
     60                                                                       
     61                                                                       
     62                                                        $by_count[0]=0;
     63                                                                       
     64                                                }
     65                                       
     66
     67                                       
     68                                       
     69                                       
     70
    2571for($i=0;$i<=$limtex-1;$i++){
    2672
    27        
    2873                                                $n1 = $n_value[$i];
     74                                                $select[$i];
     75                                                $selectf = $select[$i];
     76                                //////Time////
     77                                $Timef = $Time[$i];
     78                                               
     79                                //////// for measurement /////////
     80                                               
     81                                                $measuref = $measure[$i];
     82
     83                                //////// Date parsing into format////////
     84                                                $dateTime=new DateTime($date." ".$Time[$i]);
     85                                                $parsed_date =  $dateTime->format('Y-m-d H:i:s');
     86                                               
     87                                                echo $by_count[$i]."----".$counter[$j];
     88                                                echo "<br />";
     89                                               
    2990                       
    30                                                 $select[$i];
    31        
    32        
    33                                                 $selectf = $select[$i];
    34                                                 $Timef = $Time[$i];
    35                                                 $dateTime=new DateTime($date." ".$Time[$i]);
    36                                                
    37                                                 echo $parsed_date =  $dateTime->format('Y-m-d H:i:s');
    38                                                 $measuref = $measure[$i];
    39                
    40                        
    41                 $insert = mysql_query("INSERT INTO schedule values('','$parsed_date','$parsed_date','','','$n1','$selectf','$measuref')") or die(mysql_error());
     91                //$insert = mysql_query("INSERT INTO schedule values('','$parsed_date','$parsed_date','','','$n1','$selectf','$measuref')") or die(mysql_error());
    4292                               
    4393}
Note: See TracChangeset for help on using the changeset viewer.