Sooo schnell bin ich nicht.....
$query = mysql_query("SELECT login FROM sessions WHERE nickname = '$nickname'")or die( mysql_error() );
if( mysql_num_rows( $query ) < 1 ){
$login = time();
$sql2 = "INSERT INTO `sessions` (`nickname`, `login`)";
$sql2 .= "VALUES ('$nickname', '$login');";
query($sql2); }
else {
$query1 = "UPDATE sessions SET login ='$login' WHERE nickname='$nickname'";
$result=mysql_query($query1);
}
hab grade so angefangen.....aber....dann datet er die Tabelle nur ab
$query = mysql_query("SELECT login FROM sessions WHERE nickname = '$nickname'")or die( mysql_error() );
if( mysql_num_rows( $query ) < 1 ){
$login = time();
$sql2 = "INSERT INTO `sessions` (`nickname`, `login`)";
$sql2 .= "VALUES ('$nickname', '$login');";
query($sql2); }
else {
$query1 = "UPDATE sessions SET login ='$login' WHERE nickname='$nickname'";
$result=mysql_query($query1);
}
hab grade so angefangen.....aber....dann datet er die Tabelle nur ab