Final Project 2019 Wk. 12

This week I realized that I had to make a few changes to the database for the project. I has to make two new tables, one for likes and one for shares. These tables are to help keep track of who likes and shares certain posts, as the name implies.

Both of these tables are fairly simple, only keeping track of the id numbers for the user and the post associated with the action. By making these tables separate from the original post table like I intended in the beginning allows me to keep track of who likes and shares what so that they can both undo their action and so they can’t like or share the same thing if they already do.

In doing so, I ran into a new problem, how do I show the shared posts from the people that I am following? In order to do so, I would have to query for each user id that I follow. That seems easy enough, but the syntax for the query would not come to me. However, I feel as though I found a work around for the issue. I will put the ids needed into an array then do the search using each element in the array. It may take a little more overhead, but this is the only solution that I have at the time. After I implement this, the only thing left would be to add differing levels of security and all that comes with it, reports, and help files.

Leave a comment