query("select max(stationtime) as stationtime from tx_webcam_wetter where pid=".$webcampid); // $stationtime = $stationtime->fetch_assoc(); //echo "select max(stationtime) as stationtime from tx_webcam_wetter where pid=".$webcampid; //$stationtime = mysql_fetch_assoc($stationtime); //echo date(YmdHi,$time-600)." TIME\n"; // if (date('YmdHi',$time-600)>$stationtime['stationtime'] || !$stationtime){ $stationtime['stationtime']=date('YmdHi',$time-60); //echo $stationtime['stationtime']." StationTIME/n"; // } $firstsub=substr($stationtime['stationtime'],0, 8); $secsub=substr($stationtime['stationtime'], -4); echo $firstsub."-".$secsub; //echo ($stationtime['uid']); //$mysqli->close; #} ?>