Welcome Guest, Not a member yet? Register   Sign In
Active Record Help?
#1

[eluser]ChangedNames[/eluser]
Hi. I'm new to the MVC approach and I'm trying to get the gist of how this should be structured.

I have a podcast episode database that consists of 3 tables. One table, "episodes", has the bulk of the data. Two other tables, "author" and "site", are used relationally within "episodes". An example would be the first row of "episodes" has it's own unique ID, then unique ID of the "author" and the unique ID of the "site" (site referring to location - not website). I'm working on a back-end management side to this site and can't figure out how this should work with MVC in mind.

I have a controller, dashboard, that has a function, episode. when browsing to /dashboard/episode/1 the information from the episode with the unique ID "1" is being displayed. Currently the author ID and site ID are shown ("2", and "4" respectively). The tricky part is then communicating with table "authors" and "sites" to get the 'name' value from the corresponding rows ('name' is a column in each table respective to the data).

How do I go about retrieving this type of information from the database? I don't really need a line by line code that works - I like to figure things out for myself. Perhaps if someone could just nudge me in the right direction I'd really appreciate it.

Thanks Smile


Messages In This Thread
Active Record Help? - by El Forum - 08-27-2008, 02:08 PM
Active Record Help? - by El Forum - 08-27-2008, 02:12 PM
Active Record Help? - by El Forum - 08-27-2008, 02:20 PM
Active Record Help? - by El Forum - 08-27-2008, 02:39 PM
Active Record Help? - by El Forum - 08-27-2008, 03:04 PM
Active Record Help? - by El Forum - 08-27-2008, 11:08 PM
Active Record Help? - by El Forum - 08-28-2008, 09:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB