$_GET["id"],":codice_utente"=>$_SESSION["utente"]->codice]; $bind[":ip"] = get_client_ip(); $check = $pdo->go("SELECT codice FROM r_ping WHERE codice_conference = :codice_conference AND codice_utente = :codice_utente AND ip = :ip AND last_ping >= NOW() - INTERVAL 1 MINUTE",$bind); if ($check->rowCount() > 0) { $codice = $check->fetch(PDO::FETCH_ASSOC)["codice"]; $bind = []; $bind[":codice"] = $codice; $bind[":ip"] = get_client_ip(); $pdo->go("UPDATE r_ping SET last_ping = CURRENT_TIMESTAMP(), ip = :ip WHERE codice = :codice",$bind); } else { $pdo->go("INSERT INTO r_ping (codice_conference,codice_utente,ip,first_ping) VALUES (:codice_conference,:codice_utente,:ip,CURRENT_TIMESTAMP())",$bind); } } } ?>