Hi hab grad für meinen Chat (http://www.abschlussklasse2008.de/chat/index.php)
das sieht so aus:
Aber jetzt kommt immer nur:
Query was empty
Was is daran falsch?
Gruß Thomas
das sieht so aus:
PHP-Code:
<?php
$diff = time()-$time_to_deluser;
$nickname = $_SESSION["user_nickname"];
$jetzt = time();
$sql = "SELECT Nick FROM Online WHERE (Nick like '".$nickname."')";
$result = mysql_query ($sql);
if(mysql_num_rows($result) == "1")
{
$sql = "UPDATE Online SET time = '".time()."' WHERE Nickname = '".$nickname."'";
$result = mysql_query($query) OR die(mysql_error());
}
else
{
$query = "INSERT INTO Online (Nick, time) VALUES ('".$nickname."','".time()."')";
$result = mysql_query($query) OR die(mysql_error());
}
$sql ="DELETE FROM Online WHERE `time` < '".$diff."'";
$result = mysql_query($sql) OR die(mysql_error());
?>
Query was empty
Was is daran falsch?
Gruß Thomas
Kommentar