year; $tmp = mysql_num_rows($mes) - 1; mysql_data_seek($mes, $tmp); $row = mysql_fetch_object($mes); $mes = $row->month; $tmp = mysql_num_rows($fecha) - 1; mysql_data_seek($fecha, $tmp); $row = mysql_fetch_object($fecha); $fecha = $row->date; $tmp = mysql_num_rows($hora) - 1; mysql_data_seek($hora, $tmp); $row = mysql_fetch_object($hora); $hora = $row->time; $select = "select count(*) as dummy from accesos"; $qtotal = mysql_query($select); $row = mysql_fetch_array($qtotal); $total = $row["dummy"]; $total = $total + 1; // if access if from different user (or if this is not accomplised, if at least 10 minutes has passed from last access // $now = time(); // $diff = $now - $id; // if (($diff < 300) && ($diff >= 0) ) $void = mysql_query("INSERT INTO accesos (id) VALUES ('$total')"); $void = mysql_query("UPDATE accesos SET ip='$REMOTE_ADDR' WHERE accesos.id = '$total' "); $void = mysql_query("UPDATE accesos SET ano='$ano' WHERE accesos.id = '$total' "); $void = mysql_query("UPDATE accesos SET mes='$mes' WHERE accesos.id = '$total' "); $void = mysql_query("UPDATE accesos SET fecha='$fecha' WHERE accesos.id = '$total' "); $void = mysql_query("UPDATE accesos SET hora='$hora' WHERE accesos.id = '$total' "); // $void = mysql_query("UPDATE accesos SET seq=$seq WHERE accesos.id = '$total' "); mysql_query("UNLOCK TABLES"); mysql_close($link); ?>