I’m trying to implement a query within my code that gives me the ability to calculate the average value between the ratings received and the number of ratings per post, and sort posts from the one with the highest rating to to the one with the lowest average rating
looking at the following table and implementing this query everything works perfectly.
the problem happens when I want to get a left join with the
even if the query is correct:
print_r($ results); i get:
and I don’t understand why, understanding this step is essential for me to make the next join with the post table, so that I can get all the values out, why do I get array ()?
how can i fix it?