Hi all,
Sorry if this has been covered elsewhere, I did look but wasn't sure what to search for.
I need some advice: I have a dynamic navigation menu linking to county pages for the uk(a shop directory). The thing is, some counties do not have content, so I only want to display links for counties that DO have content.
The content (shop details) is in a table called SHOPS
The navigation is in a table called COUNTIES
There is also a table called COUNTRIES
Each link links to shop.php?county=CountyName
The navigation menu generates 4 headings, then below each lists all counties for that country, Scotland, England, Wales, Ireland etc.
Ive used an INNER JOIN and everything works fine but I cant seem to figure out how to stop it from displaying links to pages that have no content yet.
I'm sure this can be done with a mySql JOIN somehow? I'm just pretty new to JOINS, never really used them until recently and im struggling a bit here!
Well, I thought about a quick and dirty fix for now, adding a column to COUNTIES called 'display' then set it to either 0 or 1 but this just seems like going backwards.
Also, id like to display the number of results for that county in the link. (eg London (23), Kent (12) )
The main reason for wanting to remove the links is because I recently added lots of new counties to the site - problem was some of the new counties didn't have any content yet so the site got kicked off Google! ( penalised for doorway pages or duplicate content )
Any help or ideas would be great.