我的 php 文件中有以下查询:
if ($user) { //user is logged in (which he is)
$highscore = mysql_query("SELECT highscore FROM highscore WHERE fbID = $user"); //wil give 200
$fb_country_str = nl;
if (mysql_num_rows($highscore) == 0) { //if no result from highscore set it to 1
$highscore = 1;
} else { //if we do get a result, select the country (in this case it is: uk)
$country = mysql_query("SELECT country FROM highscore WHERE fbID = $user");
if (!($country == $fb_country_str)) { //if the country is NOT the same, update the country with $fb_country_str (which in this case it should update)
$sql = mysql_query("UPDATE highscore SET country = $fb_country_str WHERE fbID = $user");
}
}
}
现在,在运行时,它不会更新应将国家/地区 uk 更改为 nl 的数据库。为什么不?我错过了什么?
亲切的问候