CodeIgniter Forums
Check Sports Sites for Team Names from Database - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: Check Sports Sites for Team Names from Database (/thread-10716.html)

Check Sports Sites for Team Names from Database - El Forum - 08-09-2008

Hi everyone,
I'm new to CodeIgniter and for my first project I'm creating a news aggregator that checks new posts from about 10 different sport sites for mentions of baseball teams by comparing the post's title and text against a database table with a listing of players and their associated teams.

If it finds a match for a player name in the database, it will tag the article with the name of the player's team because the database has the player name and his team in the same row. I want to do this so I can quickly see all of the new articles about different teams. I've been fiddling around with it for a while, and I have managed to get it to aggregate the posts but I am having trouble with the tagging process. Should I put the tagging function in the model or the controller?

Also, how do I write the player/team table to an array using CodeIgniter commands (so I can compare the table to the article text)? Once the checking is done, what commands should I use to write the team names that are found to my table for that? I have a table for news posts and a related table for the tags that are found. Also, in the view, does anyone have some quick code that basically just dumps the contents of a table that match an id?