我有一个存储多个邮政编码的字段。邮政编码列的查询结果可能包含多个邮政编码:90027,90028,90068
我需要一个 if 语句来检查结果中是否有单个邮政编码
$zipstring = $rows['pool_zip_codes']);
$zipsql = "SELECT `pool_zip_codes` FROM `cases` WHERE `id` = '{$rowid}' AND `pool_zip_codes` IN ('{$zipstring}') ";
$zipqry = mysql_query($zipsql);
$zipresult = mysql_fetch_row($zipqry);
if (($zipresult[0]) == '90068') {
this zip code is in the list
} else {
not in list
}
};