我想在下面的查询中添加另一个检查,所以如果用户在 100 区,它不会允许他转移。数据库中的列是Zone
,所以如何正确添加一个检查以查看用户是否在Zone 100
不允许他转移。
$num_rows = $db->doQuery('SELECT Class, Race, Strong, Sta, Dex, Intel, Cha, Points, TransferTime FROM USERDATA WHERE strUserId = ? AND (TransferTime < DATEADD(DAY,-2,GETDATE()) OR TransferTime IS NULL)', $character);
if ($num_rows == -1) {
$db->GetError(__file__, __line__);
$this->m_ccError = Template::GetLangVar('DB_ERROR');
return false;
} else if ($num_rows == 0) {
$this->m_ccError = Template::GetLangVar('RECENT_TRANSFER');
return false;
}