我正在尝试从列country_name
和表ban_country_ip
中检索所有值,然后打印出来:
<?php
include("config.inc.php");
$countryiso = mysql_query("SELECT distinct(country_name) as country_name FROM ban_country_ip");
while ($row = mysql_fetch_assoc($countryiso)) {
echo $row['country_name'];
}
答案 0 :(得分:1)
Distinct不是mysql中的函数,而是使用以下查询
"SELECT distinct country_name FROM ban_country_ip"