adrianuk29
Technical User
I need a bit of help, if anyone can help me. I have been scratching my head for the last few hours. I am trying to list the countries with the regions from my database. At present I am getting the country and only one region. I need to display all the regions. Here is the output I recieve form my php page.
Australia
Queensland (2)
Canary Islands
Tenerife (5)
Croatia
Dalmatia (1)
In Canary Islands I have at least another two regions that should be displayed at the moment it is only showing tenerife.
Here is my code, I hope someone can help me. Many thanks.
$query = "SELECT property_location,property_region,
count(property_region) AS cnt
FROM property_data GROUP BY property_location";
$res = mysql_query($query) or die(mysql_error());
if(mysql_num_rows($res) > 0) {
while($row=mysql_fetch_array($res)) { ?>
<font face=arial size=2><? echo $row['property_location']; ?></a> <br><? echo $row['property_region']; ?> (<? echo $row['cnt']; ?> )</font><br>
<br>
<? }
}
else {
echo "Nothing found"
} ?>
Australia
Queensland (2)
Canary Islands
Tenerife (5)
Croatia
Dalmatia (1)
In Canary Islands I have at least another two regions that should be displayed at the moment it is only showing tenerife.
Here is my code, I hope someone can help me. Many thanks.
$query = "SELECT property_location,property_region,
count(property_region) AS cnt
FROM property_data GROUP BY property_location";
$res = mysql_query($query) or die(mysql_error());
if(mysql_num_rows($res) > 0) {
while($row=mysql_fetch_array($res)) { ?>
<font face=arial size=2><? echo $row['property_location']; ?></a> <br><? echo $row['property_region']; ?> (<? echo $row['cnt']; ?> )</font><br>
<br>
<? }
}
else {
echo "Nothing found"
} ?>