• 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

PS6 Leaks, Xbox PS5 Emulation & Steam…

How Computers Actually Work: A Beginner’s Guide

Complete Alt Keyboard Code list

The Valve ‘Trap’, modern DS, Silent Hill:…

Building a PC vs Buying a Steam…

PS5 vs Xbox Series X: Which Console…

NVME Tips, Using a second GPU, DLSS…

Anbernic RG DS vs Plus: Why Newer…

Steam Frame Launch, GTA6 Fair Console Comparison,…

Steam Frame Released! $1059 to $1299!

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, 2014080
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: 155
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

Join the OCmodshop NewsletterJoin the newsletter!

Recent Posts

  • PS6 Leaks, Xbox PS5 Emulation & Steam Frame Analysis (1 MILLION VIEWS SPECIAL!) | Ocmodcast ep 21
  • How Computers Actually Work: A Beginner’s Guide
  • Complete Alt Keyboard Code list
  • The Valve ‘Trap’, modern DS, Silent Hill: Townfall, and Control Resonant | OCmodcast ep 20
  • Building a PC vs Buying a Steam Machine: The Real Cost
  • PS5 vs Xbox Series X: Which Console Reigns Supreme for GTA 6?
  • NVME Tips, Using a second GPU, DLSS 5, Sony hands Xbox a Win | OCmodcast 19 (second half)
  • Anbernic RG DS vs Plus: Why Newer Isn’t Always Better
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}