You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a few questions ... who should be able to like posts ? Only the registered users ? If so, how can i register and try it ... this functionality doesnt work ... i think that it will be necessary to create another table, which will be storing all the information about who liked which post and than link it with posts table. I can see how to check, if the user hasnt already liked the post just with added column 'post_likes_count' into posts table.
Yes, this is a matter of concern. We use register only to access the admin section. No registration system for readers (normal public).
So we can't practically associate each like to the user.
But one thing we can do. We can use the local storage of the browser to check if the user has liked it or not. In that way only creating a single row post_likes_count in the table will work.
It will be a great enhancement if we add a like post feature to the site.
It will be better if we do asynchronous with javascript.
To store the likes count in the database we will add "post_likes_count" to the 'posts' table. Make a query according to that.
For more queries feel free to ask,
Thank you! Keep Contributing.
The text was updated successfully, but these errors were encountered: