• Sign in / Join

Login

Forgot your password?
Do not have an account ?Register here
X

Register

Have an account?Login here
X
  • Home
  • Blog
  • Image Gallery
  • News Archive
    • Hardware News
    • Gaming News
    • Affiliate News
Trending now

What You Need to Know: Apple iPhone…

Xbox Layoffs: What Can Developers Do Now?

I Played Halloween: The Game So You…

Do Yourself a Favor: Buy a Steam…

Halloween: The Game, Apple Foldables, Google’s Hollywood…

Divinum: The Indie Platformer You Can’t Ignore

12 Minutes of Rapid-Fire Tech Tips (volume…

Why We Defend Our VR Hardware To…

Star Wars Zero Company: A New Era…

Star Wars Zero Company, VR Hardware Tribalism,…

OCmodshop.com

  • Hardware
    • Audio
    • Cases
    • Coolers
    • Gadgets
    • Home Theater
    • Input Devices
    • Laptops
    • Memory (RAM)
    • Motherboards
    • Networking
    • Power Supplies
    • Processors (CPU)
    • Storage
    • Video Cards
  • Gaming
    • Gaming Accessories
    • Game Walkthroughs
    • PC Games
    • Xbox
    • Playstation
    • Nintendo
  • Articles
    • How-To Guides
    • Case Mod Projects
    • Software
    • Event Coverage
    • Movies
    • Interviews
  • Podcast
FacebookTwitterYoutubeSpotifyTwitchSteam
Blog

Fixed News Feeds

by Alan McCloskeyDecember 3, 2009August 25, 2014061
Share0

A few years ago I started using a news CMS to manage all of the news we post on OCModShop.com, but there has been one weird problem that has always plagued me.  If I put a news item in more than one child category, then it either shows up twice, or not at all.

There are several news items about products that don’t necessarily work in one category.  For example, iPhone games can be considered Cell Phone News and Gaming news.  NAS devices can be in the “storage” and “networking” categories.  Some games are available on multiple platforms such as the PS3, Xbox 360 and Wii at the same time.

I had been toying with the SQL for a long time, trying to isolate the problem so that I can categorize news properly.  I used GROUP BY and nested SELECT queries, and had been searching online to try and solve the problem which I thought would be rather complicated.  Since I have a many-to-many relationship between the categories and the news items, I use an intermediary table to link the two together.

Then I remembered DISTINCT.  I dropped all the weird nesting I was trying to get working and used this method, and now everything works properly.  Since all of the individual RSS feeds are controlled by this system, a particular new item can now be in more than one feed if it belongs there.

There are many improvements to be done to OCModShop, but when I see the mountain of work it gets discouraging.  Finally tackling this problem has given me enough gumption to roll up my sleeves and ‘git er done’.

Post Views: 120
Share0
previous post
50 Best Real World HD Wallpapers
next post
Dragon Age: Origins Review (PC, PS3, 360)
Alan McCloskey
Alan is a web architect, stand-up comedian, and your friendly neighborhood Grammar Nerd. You can stalk him on the Interwebs via Facebook and follow him on X @ocmodshop.

Latest podcast

Recent Posts

  • What You Need to Know: Apple iPhone Duo, Xbox Controllers, and Gaming News | Ocmodcast
  • Xbox Layoffs: What Can Developers Do Now?
  • I Played Halloween: The Game So You Don’t Have To
  • Do Yourself a Favor: Buy a Steam Deck in 2026
  • Halloween: The Game, Apple Foldables, Google’s Hollywood Heist, Console GPUs | Episode 17
  • Divinum: The Indie Platformer You Can’t Ignore
  • 12 Minutes of Rapid-Fire Tech Tips (volume 1)
  • Why We Defend Our VR Hardware To The Death
OCmodshop.com
FacebookTwitterYoutubeSpotifyTwitchSteam
@2026 - ocmodshop.com. All Right Reserved.
  • About Us
  • Terms of Use / Privacy Policy
  • Copyrights
  • Our Rating System
  • Publish an Article on OCmodshop
  • Contest Rules
OCmodshop.com
FacebookTwitterYoutubeSpotifyTwitchSteam
  • Hardware
    • Audio
    • Cases
    • Coolers
    • Gadgets
    • Home Theater
    • Input Devices
    • Laptops
    • Memory (RAM)
    • Motherboards
    • Networking
    • Power Supplies
    • Processors (CPU)
    • Storage
    • Video Cards
  • Gaming
    • Gaming Accessories
    • Game Walkthroughs
    • PC Games
    • Xbox
    • Playstation
    • Nintendo
  • Articles
    • How-To Guides
    • Case Mod Projects
    • Software
    • Event Coverage
    • Movies
    • Interviews
  • Podcast
Manage Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}