Hi all,
This must be easy to achieve. I searched the forum already, but didn't find a post that really helped me out.
I have a db which pictures from my travels. I have a page where I say something short about a continent and then want to desplay from which countries there are pictures available and how many. The first part is easy:
<cfquery name="africa" datasource="travels">
select distinct country from pictureDB where continent = 'Africa' order by country
</cfquery>
<cfoutput query="africa">
<li class="text">#country#</li>
</cfoutput>
But how do I how do I display how many entries there are of a certain country. It must be something with count(). Can't find the correct solution though.
Adrian
This must be easy to achieve. I searched the forum already, but didn't find a post that really helped me out.
I have a db which pictures from my travels. I have a page where I say something short about a continent and then want to desplay from which countries there are pictures available and how many. The first part is easy:
<cfquery name="africa" datasource="travels">
select distinct country from pictureDB where continent = 'Africa' order by country
</cfquery>
<cfoutput query="africa">
<li class="text">#country#</li>
</cfoutput>
But how do I how do I display how many entries there are of a certain country. It must be something with count(). Can't find the correct solution though.
Adrian