0
我得到這個錯誤:在 未知列'理查德「where子句」在此代碼 :mysql的更新錯誤
if(isset($_POST['Zabanovat'])){;
$nick = $_POST['nick'];
$ban = $_POST['ban'];
mysql_query("UPDATE TABLE Set usr_unban = $ban WHERE usr_nick = $nick ") OR die(mysql_error());
}
echo "<form method=\"post\">";
echo "<div class=\"formatLabel\"><label for=\"nick\"><h2>Zadejte jméno banovaného účtu</h2></label></div>";
echo "<div class=\"formatContent\"><input type=\"text\" id=\"nick\" name=\"nick\"></div>";
echo "<div class=\"formatLabel\"><label for=\"ban\"><h2>Zadejte datum unbanu (dd.mm.yyyy)</h2></label></div>";
echo "<div class=\"formatContent\"><input type=\"text\" id=\"ban\" name=\"ban\"></div>";
echo "<div class=\"formatSubmit\"><input type=\"submit\" value=\"Zabanovat\" name=\"Zabanovat\"></div>";
echo "</form>";
yikes。 http://php.net/manual/en/function.mysql-real-escape-string.php – 2011-04-08 17:33:32