我有下面的代碼,它在更新分數和日期時工作正常。但它不會更新該行的名稱或國家。這是否與PHP字符串有關?很困惑!UPDATE表mysql&php
$userName = "John";
$userCountry = "USA";
$lowestScoreId = 99;
$userPoints = 500;
include 'config.php';
$currentTime = time();
mysql_query("UPDATE highScores SET name = $userName WHERE id='$lowestScoreId'");
mysql_query("UPDATE highScores SET score = $userPoints WHERE id='$lowestScoreId'");
mysql_query("UPDATE highScores SET country =$userCountry WHERE id='$lowestScoreId'");
mysql_query("UPDATE highScores SET date = $currentTime WHERE id='$lowestScoreId'");
MySQL表格字段設置是否正確? varchar ? – 2012-07-26 19:18:53