I have a problem that I cannot solve, I was asked to implement facebook type "likes" in a blog, and I programmed it and I am getting:
But now they want the blog article to be more or less reliable, depending on the valuation, in the database I did the following:
And, depending on the number of likes , I pigeonhole the article into a level and at the moment I have this:
SELECT * FROM wp_level;
SELECT SUM(`like`) AS result FROM wp_like WHERE id_post = 22;
But if I apply a JOIN , it only returns the values that are equal and I don't know how to place if it is greater than and less than.
From already thank you very much!