First new addition for 2017

It has been a while since I did any work on the site apart from adding content and managing what is up there. Last week I came up with the idea that it would be good to know a list of all of the, say action films from the 80s or indi films from the 90s. Now there is not an easy way to do this because films are tagged with decades in the same way they are genre's. This was done by design way back when I first started as I wasn't going to tag decades as I already was putting in the year of the film. So when I then added decades it was more of an additional genre much like the way 80s action movies are a genre of their own.

So I had to come up with a way in which to do this and I tried a few different methods but nothing was really working the way I wanted so I split this into a two stage process. First you get a list of all the decades (had to alter the db to allow the decades to stand out in the genre table. Once you select a decade the next page then goes off and works out all the genres that are not decades that are tagged to films that are also tagged with the decade you have picked. This part was a little involved to get working right but not that difficult. Then the last part was to take the decade and then also the genre that was selected and display all the films tagged with those two things.

Getting this to work was a bit confusing as I tried about 4 or 5 different ways none of which worked due to the way the tables and data are laid out. I did however find a way to do this although it is not the best way, I had hoped to use group by in sql but that wasn't not possible due to the table layout. So I had to set 2 where in statements that go and pull in all the films for each of those genre's. I still need to style up the selection pages for the decade and genre but apart from that this functionality all works and is out there. I also added an extra link on the homepage of the website so you can see more than the last three films added or updated.

>>back<<