该while
循环仅适用于该值的第一条记录foreach
。我不明白为什么。任何帮助将不胜感激。
foreach($country_array as $country_new)
{
$result=mysql_query("select product.product_id,product.product_name from product left join country_iso_telcode on product.country=country_iso_telcode.country_name left join product_category_listing on product.product_id=product_category_listing.product_id where product.product_name REGEXP '[[:<:]]$search' and country_iso_telcode.region='$region' and product.country='$country_new'")or die("wrong query in search results displaying button results");
while($row=mysql_fetch_array($result))
{
$product_id=$row['product_id'];
$product_name=$row['product_name'];
}
}