<?php
	set_time_limit(0);
	echo 'inicio';
	echo '<br>';
$mysqli = new mysqli('10.118.144.75', 'internal', 'mYREbJG0E1lW', 'gpsimple');   
	$q  = "select gs_objects.imei from gs_objects , gs_user_objects where gs_objects.imei = gs_user_objects.imei  and gs_user_objects.user_id = 691";
	
	
	$r = mysqli_query($mysqli, $q);
$ct = 1;
	while($row = mysqli_fetch_row($r)){

				$upd =	"update gs_object_data_".$imei." set overpass = 0 where date_add(dt_tracker, interval -4 hour) BETWEEN '2023-06-20 00:00:00' and '2023-06-30 23:59:59'";

				$rowUpd = mysqli_query($mysqli, $upd);
				
				echo('terminando api para: '.$imei. ' - '.$dt_tracker);
				echo '</br>';
		
	}
echo 'fin';
?>
