mysql - DELETE SQL operation with PHP -
i have problem sql delete in php language. don't know problem delete sql operation. me, please?
the code is:
$query = mysqli_query($connessione, "select * (select date, time, temperature streamcopy moteid = '".$sensor."' , concat(date, ' ',time) between '".$i."' , '".$f."' order date desc, time desc) tab order date, time"); $n = 0; $m = 0; while($row = mysqli_fetch_array($query)){ if($n == 0){ $num = $row['temperature']; //ok $n = $n+1; } else{ $temp[$m] = $row; //ok if(abs($num - $temp[$m]['temperature'])<0.5){ //ok $queryfixed = mysqli_query($connessione, "delete streamcopy moteid = '".$sensor."' , temperature = '".$temp[$m]['temperature']."' , date = '".$temp[$m]['date']."' , time = '".$temp[$m]['time']."')"); /* elimina dati di temperatura k vicini */ $n = $n+1; $m = $m+1; } else{ $num = $temp[$m]['temperature']; $n = $n+1; $m = $m+1; } } }
Comments
Post a Comment